1
1
import nox
2
2
3
3
4
- @nox .session (python = ' 2.7' )
4
+ @nox .session (python = " 2.7" )
5
5
def cover (session ):
6
- session .install ('pytest' , 'mock' , 'coverage' , 'pytest-cov' )
7
- session .install ('.' )
8
- session .run ('py.test' , '--quiet' , '--cov=google.cloud.happybase' , '--cov=unit_tests' , '--cov-config' , '.coveragerc' , 'unit_tests' )
6
+ session .install ("pytest" , "mock" , "coverage" , "pytest-cov" )
7
+ session .install ("." )
8
+ session .run (
9
+ "py.test" ,
10
+ "--quiet" ,
11
+ "--cov=google.cloud.happybase" ,
12
+ "--cov=unit_tests" ,
13
+ "--cov-config" ,
14
+ ".coveragerc" ,
15
+ "unit_tests" ,
16
+ )
9
17
10
- @nox .session (python = '2.7' )
18
+
19
+ @nox .session (python = "2.7" )
11
20
def docs (session ):
12
- session .install ('pytest' , 'mock' , 'Sphinx' , 'sphinx_rtd_theme' )
13
- session .install ('.' )
14
- session .run ('python' , '-c' , "import shutil; shutil.rmtree('docs/_build', ignore_errors=True)" )
15
- session .run ('sphinx-build' , '-W' , '-b' , 'html' , '-d' , 'docs/_build/doctrees' , 'docs' , 'docs/_build/html' )
16
- session .run ('python' , 'scripts/verify_included_modules.py' , '--build-root' , '_build' )
21
+ session .install ("pytest" , "mock" , "Sphinx" , "sphinx_rtd_theme" )
22
+ session .install ("." )
23
+ session .run (
24
+ "python" ,
25
+ "-c" ,
26
+ "import shutil; shutil.rmtree('docs/_build', ignore_errors=True)" ,
27
+ )
28
+ session .run (
29
+ "sphinx-build" ,
30
+ "-W" ,
31
+ "-b" ,
32
+ "html" ,
33
+ "-d" ,
34
+ "docs/_build/doctrees" ,
35
+ "docs" ,
36
+ "docs/_build/html" ,
37
+ )
38
+ session .run (
39
+ "python" , "scripts/verify_included_modules.py" , "--build-root" , "_build"
40
+ )
41
+
17
42
18
43
@nox .session (python = "3.7" )
19
44
def lint (session ):
@@ -22,36 +47,25 @@ def lint(session):
22
47
serious code quality issues.
23
48
"""
24
49
session .install ("flake8" , "black" )
25
- session .run (
26
- "black" ,
27
- "--check" ,
28
- "src" ,
29
- "docs" ,
30
- "unit_tests" ,
31
- "system_tests"
32
- )
50
+ session .run ("black" , "--check" , "src" , "docs" , "unit_tests" , "system_tests" )
33
51
session .run ("flake8" , "google" , "tests" )
34
52
35
- @nox .session (python = '3.6' )
53
+
54
+ @nox .session (python = "3.6" )
36
55
def blacken (session ):
37
56
session .install ("black" )
38
- session .run (
39
- "black" ,
40
- "noxfile.py"
41
- "src" ,
42
- "docs" ,
43
- "unit_tests" ,
44
- "system_tests" ,
45
- )
57
+ session .run ("black" , "noxfile.py" "src" , "docs" , "unit_tests" , "system_tests" )
46
58
47
- @nox .session (python = ['2.7' , '3.4' , '3.5' ])
59
+
60
+ @nox .session (python = ["2.7" , "3.4" , "3.5" ])
48
61
def tests (session ):
49
- session .install ('pytest' , 'mock' )
50
- session .install ('.' )
51
- session .run ('py.test' , '--quiet' , 'unit_tests' )
62
+ session .install ("pytest" , "mock" )
63
+ session .install ("." )
64
+ session .run ("py.test" , "--quiet" , "unit_tests" )
65
+
52
66
53
- @nox .session (python = [' 2.7' , ' 3.4' ])
67
+ @nox .session (python = [" 2.7" , " 3.4" ])
54
68
def system_tests (session ):
55
- session .install (' pytest' , ' mock' )
56
- session .install ('.' )
57
- session .run (' python' , ' system_tests/attempt_system_tests.py' )
69
+ session .install (" pytest" , " mock" )
70
+ session .install ("." )
71
+ session .run (" python" , " system_tests/attempt_system_tests.py" )
0 commit comments