Skip to content

Commit 8990c0f

Browse files
busunkim96theacodes
authored andcommitted
Use new Nox (#6175)
1 parent 3baf3e7 commit 8990c0f

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed
Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
)
2525

2626

27-
@nox.session
2827
def default(session):
2928
"""Default unit test session.
3029
@@ -52,28 +51,18 @@ def default(session):
5251
)
5352

5453

55-
@nox.session
56-
@nox.parametrize('py', ['2.7', '3.5', '3.6', '3.7'])
57-
def unit(session, py):
54+
@nox.session(python=['2.7', '3.5', '3.6', '3.7'])
55+
def unit(session):
5856
"""Run the unit test suite."""
59-
60-
session.interpreter = 'python{}'.format(py)
61-
session.virtualenv_dirname = 'unit-' + py
6257
default(session)
6358

6459

65-
@nox.session
66-
@nox.parametrize('py', ['2.7', '3.7'])
67-
def system(session, py):
60+
@nox.session(python=['2.7', '3.7'])
61+
def system(session):
6862
"""Run the system test suite."""
6963

7064
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
7165
session.skip('Credentials must be set via environment variable.')
72-
73-
session.interpreter = 'python{}'.format(py)
74-
75-
session.virtualenv_dirname = 'sys-' + py
76-
7766
# Use pre-release gRPC for system tests.
7867
session.install('--pre', 'grpcio')
7968

@@ -84,10 +73,9 @@ def system(session, py):
8473
*session.posargs)
8574

8675

87-
@nox.session
76+
@nox.session(python='3.6')
8877
def lint_setup_py(session):
8978
"""Verify that setup.py is valid (including RST check)."""
90-
session.interpreter = 'python3.6'
9179
session.install('docutils', 'pygments')
9280
session.run('python', 'setup.py', 'check', '--restructuredtext',
9381
'--strict')

0 commit comments

Comments
 (0)