Skip to content

Commit 31bfd39

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 7740a5d commit 31bfd39

File tree

1 file changed

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

1 file changed

+21
-9
lines changed

packages/google-cloud-firestore/nox.py

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

2828

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

5957

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

0 commit comments

Comments
 (0)