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 )
@@ -56,19 +56,19 @@ def unit_tests(session, python_version):
56
56
57
57
58
58
@nox .session
59
- @nox .parametrize ('python_version ' , ['2.7' , '3.6' ])
60
- def system_tests (session , python_version ):
59
+ @nox .parametrize ('py ' , ['2.7' , '3.6' ])
60
+ def system (session , py ):
61
61
"""Run the system test suite."""
62
62
63
63
# Sanity check: Only run system tests if the environment variable is set.
64
64
if not os .environ .get ('GOOGLE_APPLICATION_CREDENTIALS' , '' ):
65
65
session .skip ('Credentials must be set via environment variable.' )
66
66
67
67
# Run the system tests against latest Python 2 and Python 3 only.
68
- session .interpreter = 'python{}' .format (python_version )
68
+ session .interpreter = 'python{}' .format (py )
69
69
70
70
# Set the virtualenv dirname.
71
- session .virtualenv_dirname = 'sys-' + python_version
71
+ session .virtualenv_dirname = 'sys-' + py
72
72
73
73
# Install all test dependencies, then install this package into the
74
74
# virtualenv's dist-packages.
@@ -89,19 +89,19 @@ def system_tests(session, python_version):
89
89
90
90
91
91
@nox .session
92
- @nox .parametrize ('python_version ' , ['2.7' , '3.6' ])
93
- def snippets_tests (session , python_version ):
92
+ @nox .parametrize ('py ' , ['2.7' , '3.6' ])
93
+ def snippets_tests (session , py ):
94
94
"""Run the system test suite."""
95
95
96
96
# Sanity check: Only run system tests if the environment variable is set.
97
97
if not os .environ .get ('GOOGLE_APPLICATION_CREDENTIALS' , '' ):
98
98
session .skip ('Credentials must be set via environment variable.' )
99
99
100
100
# Run the system tests against latest Python 2 and Python 3 only.
101
- session .interpreter = 'python{}' .format (python_version )
101
+ session .interpreter = 'python{}' .format (py )
102
102
103
103
# Set the virtualenv dirname.
104
- session .virtualenv_dirname = 'snip-' + python_version
104
+ session .virtualenv_dirname = 'snip-' + py
105
105
106
106
# Install all test dependencies, then install this package into the
107
107
# virtualenv's dist-packages.
0 commit comments