Skip to content

Commit dfb5a7d

Browse files
busunkim96theacodes
authored andcommitted
Use new Nox (#6175)
1 parent 0715c9e commit dfb5a7d

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

packages/google-cloud-os-login/nox.py renamed to packages/google-cloud-os-login/noxfile.py

Lines changed: 7 additions & 18 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,10 +27,15 @@ def unit(session, py):
4327
session.run('py.test', '--quiet', os.path.join('tests', 'unit'))
4428

4529

46-
@nox.session
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+
36+
@nox.session(python='3.6')
4737
def lint_setup_py(session):
4838
"""Verify that setup.py is valid (including RST check)."""
49-
session.interpreter = 'python3.6'
5039
session.install('docutils', 'pygments')
5140
session.run('python', 'setup.py', 'check', '--restructuredtext',
5241
'--strict')

0 commit comments

Comments
 (0)