Skip to content

Commit 36991f2

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 f3a3426 commit 36991f2

File tree

1 file changed

+21
-9
lines changed
  • packages/google-cloud-bigtable

1 file changed

+21
-9
lines changed

packages/google-cloud-bigtable/nox.py

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

2626

2727
@nox.session
28-
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
29-
def unit(session, py):
30-
"""Run the unit test suite."""
31-
32-
# Run unit tests against all supported versions of Python.
33-
session.interpreter = 'python{}'.format(py)
34-
35-
# Set the virtualenv dirname.
36-
session.virtualenv_dirname = 'unit-' + py
28+
def default(session):
29+
"""Default unit test session.
3730
31+
This is intended to be run **without** an interpreter set, so
32+
that the current ``python`` (on the ``PATH``) or the version of
33+
Python corresponding to the ``nox`` binary the ``PATH`` can
34+
run the tests.
35+
"""
3836
# Install all test dependencies, then install this package in-place.
3937
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
4038
session.install('-e', '.')
@@ -54,6 +52,20 @@ def unit(session, py):
5452
)
5553

5654

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

0 commit comments

Comments
 (0)