Skip to content

Commit f75b795

Browse files
busunkim96theacodes
authored andcommitted
Use new Nox (#6175)
1 parent 6aa6998 commit f75b795

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

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

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,7 @@
1919

2020
import nox
2121

22-
23-
@nox.session
2422
def default(session):
25-
return unit(session, 'default')
26-
27-
28-
@nox.session
29-
@nox.parametrize('py', ['2.7', '3.5', '3.6', '3.7'])
30-
def unit(session, py):
31-
"""Run the unit test suite."""
32-
33-
# Run unit tests against all supported versions of Python.
34-
if py != 'default':
35-
session.interpreter = 'python{}'.format(py)
36-
37-
# Set the virtualenv directory name.
38-
session.virtualenv_dirname = 'unit-' + py
39-
4023
# Install all test dependencies, then install this package in-place.
4124
session.install('pytest')
4225
session.install('-e', '.')
@@ -45,10 +28,14 @@ def unit(session, py):
4528
session.run('py.test', '--quiet', os.path.join('tests', 'unit'))
4629

4730

48-
@nox.session
31+
@nox.session(python=['2.7', '3.5', '3.6', '3.7'])
32+
def unit(session):
33+
"""Run the unit test suite."""
34+
default(session)
35+
36+
@nox.session(python='3.6')
4937
def lint_setup_py(session):
5038
"""Verify that setup.py is valid (including RST check)."""
51-
session.interpreter = 'python3.6'
5239
session.install('docutils', 'pygments')
5340
session.run('python', 'setup.py', 'check', '--restructuredtext',
5441
'--strict')

0 commit comments

Comments
 (0)