19
19
20
20
import nox
21
21
22
-
23
- @nox .session
24
22
def default (session ):
25
- return unit (session , 'default' )
26
-
27
-
28
- @nox .session
29
- @nox .parametrize ('py' , ['2.7' , '3.5' , '3.6' , '3.7' ])
30
- def unit (session , py ):
31
- """Run the unit test suite."""
32
-
33
- # Run unit tests against all supported versions of Python.
34
- if py != 'default' :
35
- session .interpreter = 'python{}' .format (py )
36
-
37
- # Set the virtualenv directory name.
38
- session .virtualenv_dirname = 'unit-' + py
39
-
40
23
# Install all test dependencies, then install this package in-place.
41
24
session .install ('pytest' )
42
25
session .install ('-e' , '.' )
@@ -45,10 +28,14 @@ def unit(session, py):
45
28
session .run ('py.test' , '--quiet' , os .path .join ('tests' , 'unit' ))
46
29
47
30
48
- @nox .session
31
+ @nox .session (python = ['2.7' , '3.5' , '3.6' , '3.7' ])
32
+ def unit (session ):
33
+ """Run the unit test suite."""
34
+ default (session )
35
+
36
+ @nox .session (python = '3.6' )
49
37
def lint_setup_py (session ):
50
38
"""Verify that setup.py is valid (including RST check)."""
51
- session .interpreter = 'python3.6'
52
39
session .install ('docutils' , 'pygments' )
53
40
session .run ('python' , 'setup.py' , 'check' , '--restructuredtext' ,
54
41
'--strict' )
0 commit comments