Skip to content

Commit a170619

Browse files
busunkim96theacodes
authored andcommitted
Use new Nox (#6175)
1 parent 5caedaf commit a170619

1 file changed

Lines changed: 5 additions & 18 deletions

File tree

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,22 @@
2020
import nox
2121

2222

23-
@nox.session
2423
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-
4024
# Install all test dependencies, then install this package in-place.
4125
session.install('pytest')
4226
session.install('-e', '.')
4327

4428
# Run py.test against the unit tests.
4529
session.run('py.test', '--quiet', os.path.join('tests', 'unit'))
4630

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)
4735

48-
@nox.session
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)