|
8 | 8 |
|
9 | 9 | import nox
|
10 | 10 |
|
11 |
| - |
12 | 11 | PANDAS_PRE_WHEELS = (
|
13 |
| - 'https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83' |
14 |
| - '.ssl.cf2.rackcdn.com') |
| 12 | + "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83" |
| 13 | + ".ssl.cf2.rackcdn.com" |
| 14 | +) |
15 | 15 |
|
16 | 16 |
|
17 | 17 | @nox.session
|
18 | 18 | def default(session):
|
19 |
| - session.install('mock', 'pytest', 'pytest-cov') |
20 |
| - session.install('-e', '.') |
| 19 | + session.install("mock", "pytest", "pytest-cov") |
| 20 | + session.install("-e", ".") |
21 | 21 |
|
22 | 22 | # Skip local auth tests on Travis.
|
23 | 23 | additional_args = list(session.posargs)
|
24 |
| - if 'TRAVIS_BUILD_DIR' in os.environ: |
25 |
| - additional_args = additional_args + [ |
26 |
| - '-m', |
27 |
| - 'not local_auth', |
28 |
| - ] |
| 24 | + if "TRAVIS_BUILD_DIR" in os.environ: |
| 25 | + additional_args = additional_args + ["-m", "not local_auth"] |
29 | 26 |
|
30 | 27 | session.run(
|
31 |
| - 'pytest', |
32 |
| - os.path.join('.', 'tests'), |
33 |
| - '--quiet', |
34 |
| - '--cov=pandas_gbq', |
35 |
| - '--cov=tests.unit', |
36 |
| - '--cov-report', |
37 |
| - 'xml:/tmp/pytest-cov.xml', |
| 28 | + "pytest", |
| 29 | + os.path.join(".", "tests"), |
| 30 | + "--quiet", |
| 31 | + "--cov=pandas_gbq", |
| 32 | + "--cov=tests.unit", |
| 33 | + "--cov-report", |
| 34 | + "xml:/tmp/pytest-cov.xml", |
38 | 35 | *additional_args
|
39 | 36 | )
|
40 | 37 |
|
41 | 38 |
|
42 | 39 | @nox.session
|
43 | 40 | def unit(session):
|
44 |
| - session.install('mock', 'pytest', 'pytest-cov') |
45 |
| - session.install('-e', '.') |
| 41 | + session.install("mock", "pytest", "pytest-cov") |
| 42 | + session.install("-e", ".") |
46 | 43 | session.run(
|
47 |
| - 'pytest', |
48 |
| - os.path.join('.', 'tests', 'unit'), |
49 |
| - '--quiet', |
50 |
| - '--cov=pandas_gbq', |
51 |
| - '--cov=tests.unit', |
52 |
| - '--cov-report', |
53 |
| - 'xml:/tmp/pytest-cov.xml', |
| 44 | + "pytest", |
| 45 | + os.path.join(".", "tests", "unit"), |
| 46 | + "--quiet", |
| 47 | + "--cov=pandas_gbq", |
| 48 | + "--cov=tests.unit", |
| 49 | + "--cov-report", |
| 50 | + "xml:/tmp/pytest-cov.xml", |
54 | 51 | *session.posargs
|
55 | 52 | )
|
56 | 53 |
|
57 | 54 |
|
58 | 55 | @nox.session
|
59 | 56 | def test27(session):
|
60 |
| - session.interpreter = 'python2.7' |
| 57 | + session.interpreter = "python2.7" |
61 | 58 | session.install(
|
62 |
| - '-r', os.path.join('.', 'ci', 'requirements-2.7-0.19.2.pip')) |
| 59 | + "-r", os.path.join(".", "ci", "requirements-2.7-0.19.2.pip") |
| 60 | + ) |
63 | 61 | default(session)
|
64 | 62 |
|
65 | 63 |
|
66 | 64 | @nox.session
|
67 | 65 | def test35(session):
|
68 |
| - session.interpreter = 'python3.5' |
| 66 | + session.interpreter = "python3.5" |
69 | 67 | session.install(
|
70 |
| - '-r', os.path.join('.', 'ci', 'requirements-3.5-0.18.1.pip')) |
| 68 | + "-r", os.path.join(".", "ci", "requirements-3.5-0.18.1.pip") |
| 69 | + ) |
71 | 70 | default(session)
|
72 | 71 |
|
73 | 72 |
|
74 | 73 | @nox.session
|
75 | 74 | def test36(session):
|
76 |
| - session.interpreter = 'python3.6' |
| 75 | + session.interpreter = "python3.6" |
77 | 76 | session.install(
|
78 |
| - '-r', os.path.join('.', 'ci', 'requirements-3.6-0.20.1.conda')) |
| 77 | + "-r", os.path.join(".", "ci", "requirements-3.6-0.20.1.conda") |
| 78 | + ) |
79 | 79 | default(session)
|
80 | 80 |
|
81 | 81 |
|
82 | 82 | @nox.session
|
83 | 83 | def test36master(session):
|
84 |
| - session.interpreter = 'python3.6' |
| 84 | + session.interpreter = "python3.6" |
85 | 85 | session.install(
|
86 |
| - '--pre', |
87 |
| - '--upgrade', |
88 |
| - '--timeout=60', |
89 |
| - '-f', PANDAS_PRE_WHEELS, |
90 |
| - 'pandas') |
| 86 | + "--pre", "--upgrade", "--timeout=60", "-f", PANDAS_PRE_WHEELS, "pandas" |
| 87 | + ) |
91 | 88 | session.install(
|
92 |
| - '-r', os.path.join('.', 'ci', 'requirements-3.6-MASTER.pip')) |
| 89 | + "-r", os.path.join(".", "ci", "requirements-3.6-MASTER.pip") |
| 90 | + ) |
93 | 91 | default(session)
|
94 | 92 |
|
95 | 93 |
|
96 | 94 | @nox.session
|
97 | 95 | def lint(session):
|
98 |
| - session.install('flake8') |
99 |
| - session.run('flake8', 'pandas_gbq', 'tests', '-v') |
| 96 | + session.install("flake8") |
| 97 | + session.run("flake8", "pandas_gbq", "tests", "-v") |
100 | 98 |
|
101 | 99 |
|
102 | 100 | @nox.session
|
103 | 101 | def cover(session):
|
104 |
| - session.interpreter = 'python3.5' |
| 102 | + session.interpreter = "python3.5" |
105 | 103 |
|
106 |
| - session.install('coverage', 'pytest-cov') |
107 |
| - session.run('coverage', 'report', '--show-missing', '--fail-under=40') |
108 |
| - session.run('coverage', 'erase') |
| 104 | + session.install("coverage", "pytest-cov") |
| 105 | + session.run("coverage", "report", "--show-missing", "--fail-under=40") |
| 106 | + session.run("coverage", "erase") |
0 commit comments