Skip to content

Commit

Permalink
Expanding the allowable descriptions for vision system tests. (google…
Browse files Browse the repository at this point in the history
…apis#3729)

Fixes googleapis#3681.

Also updating the `nox` configuration to allow posargs pass
through and be a little more Windows path friendly.
  • Loading branch information
dhermes authored and landrito committed Aug 22, 2017
1 parent a40b532 commit f0e02df
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 13 deletions.
28 changes: 22 additions & 6 deletions vision/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)


Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion vision/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Expand Down
18 changes: 12 additions & 6 deletions vision/tests/system_old.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit f0e02df

Please sign in to comment.