From 4f1b98eb79020f979a2307d673bf8f92886abe1c Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Fri, 4 Aug 2017 15:20:58 -0700 Subject: [PATCH] Expanding the allowable descriptions for vision system tests. (#3729) Fixes #3681. Also updating the `nox` configuration to allow posargs pass through and be a little more Windows path friendly. --- vision/nox.py | 28 ++++++++++++++++++++++------ vision/setup.py | 2 +- vision/tests/system_old.py | 18 ++++++++++++------ 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/vision/nox.py b/vision/nox.py index a030b7a9e5bbe..f16771018a476 100644 --- a/vision/nox.py +++ b/vision/nox.py @@ -35,10 +35,16 @@ def unit_tests(session, python_version): session.install('-e', '.') # Run py.test against the unit tests. - session.run('py.test', '--quiet', - '--cov=google.cloud.vision', '--cov=google.cloud.vision_v1', - '--cov-append', '--cov-config=.coveragerc', '--cov-report=', - 'tests/', + session.run( + 'py.test', + '--quiet', + '--cov=google.cloud.vision', + '--cov=google.cloud.vision_v1', + '--cov-append', + '--cov-config=.coveragerc', + '--cov-report=', + 'tests', + *session.posargs ) @@ -63,7 +69,12 @@ def system_tests(session, python_version): session.install('-e', '.') # Run py.test against the unit tests. - session.run('py.test', '--quiet', 'tests/system.py') + session.run( + 'py.test', + '--quiet', + os.path.join('tests', 'system.py'), + *session.posargs + ) @nox.session @@ -84,7 +95,12 @@ def system_tests_manual_layer(session, python_version): session.install('-e', '.') # Run py.test against the unit tests. - session.run('py.test', '--quiet', 'tests/system_old.py') + session.run( + 'py.test', + '--quiet', + os.path.join('tests', 'system_old.py'), + *session.posargs + ) @nox.session diff --git a/vision/setup.py b/vision/setup.py index ad485c0e8642a..4847c0c2c7f5f 100644 --- a/vision/setup.py +++ b/vision/setup.py @@ -25,7 +25,7 @@ readme = readme_file.read() REQUIREMENTS = [ - 'google-cloud-core >= 0.25.0, < 0.26dev', + 'google-cloud-core >= 0.26.0, < 0.27dev', 'google-gax >= 0.15.13, < 0.16dev', 'googleapis-common-protos[grpc] >= 1.5.2, < 2.0dev', ] diff --git a/vision/tests/system_old.py b/vision/tests/system_old.py index cddf399ddf5f0..99893dad2340d 100644 --- a/vision/tests/system_old.py +++ b/vision/tests/system_old.py @@ -332,17 +332,23 @@ def test_detect_faces_filename(self): class TestVisionClientLabel(BaseVisionTestCase): + DESCRIPTIONS = ( + 'automobile make', + 'automotive design', + 'automotive exterior', + 'automotive wheel system', 'car', - 'vehicle', 'land vehicle', - 'automotive design', - 'wheel', - 'automobile make', 'luxury vehicle', - 'sports car', + 'motor vehicle', + 'muscle car', 'performance car', - 'automotive exterior', + 'personal luxury car', + 'rim', + 'sports car', + 'vehicle', + 'wheel', ) def setUp(self):