Skip to content

Commit 2e3d092

Browse files
busunkim96theacodes
authored andcommitted
Use new Nox (#6175)
1 parent 1439e0b commit 2e3d092

1 file changed

Lines changed: 9 additions & 27 deletions

File tree

packages/google-cloud-videointelligence/nox.py renamed to packages/google-cloud-videointelligence/noxfile.py

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,7 @@
1818
import nox
1919

2020

21-
@nox.session
2221
def default(session):
23-
return unit(session, 'default')
24-
25-
26-
@nox.session
27-
@nox.parametrize('py', ['2.7', '3.5', '3.6', '3.7'])
28-
def unit(session, py):
29-
"""Run the unit test suite."""
30-
31-
# Run unit tests against all supported versions of Python.
32-
if py != 'default':
33-
session.interpreter = 'python{}'.format(py)
34-
35-
# Set the virtualenv directory name.
36-
session.virtualenv_dirname = 'unit-' + py
37-
3822
# Install all test dependencies, then install this package in-place.
3923
session.install('pytest')
4024
session.install('-e', '.')
@@ -43,22 +27,21 @@ def unit(session, py):
4327
session.run('py.test', '--quiet', os.path.join('tests', 'unit'))
4428

4529

30+
@nox.session(python=['2.7', '3.5', '3.6', '3.7'])
31+
def unit(session):
32+
"""Run the unit test suite."""
33+
default(session)
34+
35+
4636
# TODO: Fix generated system tests
47-
#@nox.session
48-
#@nox.parametrize('py', ['2.7', '3.7'])
49-
#def system(session, py):
37+
#@nox.session(python=['2.7', '3.7'])
38+
#def system(session):
5039
# """Run the system test suite."""
5140
#
5241
# # Sanity check: Only run system tests if the environment variable is set.
5342
# if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
5443
# session.skip('Credentials must be set via environment variable.')
5544
#
56-
# # Run unit tests against all supported versions of Python.
57-
# session.interpreter = 'python{}'.format(py)
58-
#
59-
# # Set the virtualenv dirname.
60-
# session.virtualenv_dirname = 'sys-' + py
61-
#
6245
# # Install all test dependencies, then install this package in-place.
6346
# session.install('pytest')
6447
# session.install('-e', '.')
@@ -68,10 +51,9 @@ def unit(session, py):
6851
# *session.posargs)
6952

7053

71-
@nox.session
54+
@nox.session(python='3.6')
7255
def lint_setup_py(session):
7356
"""Verify that setup.py is valid (including RST check)."""
74-
session.interpreter = 'python3.6'
7557
session.install('docutils', 'pygments')
7658
session.run('python', 'setup.py', 'check', '--restructuredtext',
7759
'--strict')

0 commit comments

Comments
 (0)