26
26
27
27
28
28
@nox .session
29
- @nox .parametrize ('python_version ' , ['2.7' , '3.4' , '3.5' , '3.6' ])
30
- def unit_tests (session , python_version ):
29
+ @nox .parametrize ('py ' , ['2.7' , '3.4' , '3.5' , '3.6' ])
30
+ def unit (session , py ):
31
31
"""Run the unit test suite."""
32
32
33
33
# Run unit tests against all supported versions of Python.
34
- session .interpreter = 'python{}' .format (python_version )
34
+ session .interpreter = 'python{}' .format (py )
35
35
36
36
# Set the virtualenv dirname.
37
- session .virtualenv_dirname = 'unit-' + python_version
37
+ session .virtualenv_dirname = 'unit-' + py
38
38
39
39
# Install all test dependencies, then install this package in-place.
40
40
session .install ('mock' , 'pytest' , 'pytest-cov' , * LOCAL_DEPS )
@@ -49,19 +49,19 @@ def unit_tests(session, python_version):
49
49
50
50
51
51
@nox .session
52
- @nox .parametrize ('python_version ' , ['2.7' , '3.6' ])
53
- def system_tests (session , python_version ):
52
+ @nox .parametrize ('py ' , ['2.7' , '3.6' ])
53
+ def system (session , py ):
54
54
"""Run the system test suite."""
55
55
56
56
# Sanity check: Only run system tests if the environment variable is set.
57
57
if not os .environ .get ('GOOGLE_APPLICATION_CREDENTIALS' , '' ):
58
58
session .skip ('Credentials must be set via environment variable.' )
59
59
60
60
# Run the system tests against latest Python 2 and Python 3 only.
61
- session .interpreter = 'python{}' .format (python_version )
61
+ session .interpreter = 'python{}' .format (py )
62
62
63
63
# Set the virtualenv dirname.
64
- session .virtualenv_dirname = 'sys-' + python_version
64
+ session .virtualenv_dirname = 'sys-' + py
65
65
66
66
# Install all test dependencies, then install this package into the
67
67
# virtualenv's dist-packages.
0 commit comments