Skip to content

Commit fd1d18f

Browse files
authored
Making a nox -s default session for all packages. (#4324)
* Making a `nox -s default` session for all packages. * Using "default" `nox` session on AppVeyor. This was 32-bit or 64-bit Python can be used, depending on which is the active `python` / the active `nox.exe`.
1 parent e971bae commit fd1d18f

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

nox.py

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@
1919

2020

2121
@nox.session
22-
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
23-
def unit(session, py):
24-
"""Run the unit test suite."""
25-
26-
# Run unit tests against all supported versions of Python.
27-
session.interpreter = 'python{}'.format(py)
28-
29-
# Set the virtualenv dirname.
30-
session.virtualenv_dirname = 'unit-' + py
22+
def default(session):
23+
"""Default unit test session.
3124
25+
This is intended to be run **without** an interpreter set, so
26+
that the current ``python`` (on the ``PATH``) or the version of
27+
Python corresponding to the ``nox`` binary the ``PATH`` can
28+
run the tests.
29+
"""
3230
# Install all test dependencies, then install this package in-place.
3331
session.install(
3432
'mock',
@@ -53,6 +51,20 @@ def unit(session, py):
5351
)
5452

5553

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

0 commit comments

Comments
 (0)