Skip to content

Commit e0a9e17

Browse files
busunkim96theacodes
authored andcommitted
Use new Nox (#6175)
1 parent a4186f9 commit e0a9e17

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

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

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

2727

28-
@nox.session
2928
def default(session):
3029
"""Default unit test session.
3130
@@ -54,49 +53,38 @@ def default(session):
5453
)
5554

5655

57-
@nox.session
58-
@nox.parametrize('py', ['2.7', '3.5', '3.6', '3.7'])
59-
def unit(session, py):
56+
@nox.session(python=['2.7', '3.5', '3.6', '3.7'])
57+
def unit(session):
6058
"""Run the unit test suite."""
61-
62-
# Run unit tests against all supported versions of Python.
63-
session.interpreter = 'python{}'.format(py)
64-
65-
# Set the virtualenv dirname.
66-
session.virtualenv_dirname = 'unit-' + py
67-
6859
default(session)
6960

7061

71-
@nox.session
62+
@nox.session(python='3.6')
7263
def lint(session):
7364
"""Run linters.
7465
7566
Returns a failure if the linters find linting errors or sufficiently
7667
serious code quality issues.
7768
"""
78-
session.interpreter = 'python3.6'
7969
session.install('flake8', *LOCAL_DEPS)
8070
session.install('.')
8171
session.run('flake8', 'google', 'tests')
8272

8373

84-
@nox.session
74+
@nox.session(python='3.6')
8575
def lint_setup_py(session):
8676
"""Verify that setup.py is valid (including RST check)."""
87-
session.interpreter = 'python3.6'
8877
session.install('docutils', 'pygments')
8978
session.run(
9079
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
9180

9281

93-
@nox.session
82+
@nox.session(python='3.6')
9483
def cover(session):
9584
"""Run the final coverage report.
9685
This outputs the coverage report aggregating coverage from the unit
9786
test runs (not system test runs), and then erases coverage data.
9887
"""
99-
session.interpreter = 'python3.6'
10088
session.install('coverage', 'pytest-cov')
10189
session.run('coverage', 'report', '--show-missing', '--fail-under=100')
10290
session.run('coverage', 'erase')

0 commit comments

Comments
 (0)