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