|
27 | 27 |
|
28 | 28 |
|
29 | 29 | @nox.session |
30 | | -@nox.parametrize('python_version', ['2.7', '3.4', '3.5', '3.6']) |
31 | | -def unit_tests(session, python_version): |
| 30 | +@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6']) |
| 31 | +def unit(session, py): |
32 | 32 | """Run the unit test suite.""" |
33 | 33 |
|
34 | 34 | # Run unit tests against all supported versions of Python. |
35 | | - session.interpreter = 'python{}'.format(python_version) |
| 35 | + session.interpreter = 'python{}'.format(py) |
36 | 36 |
|
37 | 37 | # Set the virtualenv dirname. |
38 | | - session.virtualenv_dirname = 'unit-' + python_version |
| 38 | + session.virtualenv_dirname = 'unit-' + py |
39 | 39 |
|
40 | 40 | # Install all test dependencies, then install this package in-place. |
41 | 41 | session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS) |
@@ -83,19 +83,19 @@ def lint_setup_py(session): |
83 | 83 |
|
84 | 84 |
|
85 | 85 | @nox.session |
86 | | -@nox.parametrize('python_version', ['2.7', '3.6']) |
87 | | -def system_tests(session, python_version): |
| 86 | +@nox.parametrize('py', ['2.7', '3.6']) |
| 87 | +def system(session, py): |
88 | 88 | """Run the system test suite.""" |
89 | 89 |
|
90 | 90 | # Sanity check: Only run system tests if the environment variable is set. |
91 | 91 | if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): |
92 | 92 | session.skip('Credentials must be set via environment variable.') |
93 | 93 |
|
94 | 94 | # Run the system tests against latest Python 2 and Python 3 only. |
95 | | - session.interpreter = 'python{}'.format(python_version) |
| 95 | + session.interpreter = 'python{}'.format(py) |
96 | 96 |
|
97 | 97 | # Set the virtualenv dirname. |
98 | | - session.virtualenv_dirname = 'sys-' + python_version |
| 98 | + session.virtualenv_dirname = 'sys-' + py |
99 | 99 |
|
100 | 100 | # Install all test dependencies, then install this package into the |
101 | 101 | # virtualenv's dist-packages. |
|
0 commit comments