|
3 | 3 |
|
4 | 4 | import nox |
5 | 5 |
|
6 | | -REPO_TOOLS_REQ =\ |
| 6 | +REPO_TOOLS_REQ = \ |
7 | 7 | 'git+https://github.com/GoogleCloudPlatform/python-repo-tools.git' |
8 | 8 |
|
9 | 9 | DIRS = [ |
@@ -35,14 +35,24 @@ def session_lint(session): |
35 | 35 | '--import-order-style=google', '.') |
36 | 36 |
|
37 | 37 |
|
38 | | -@nox.parametrize('dir', DIRS) |
39 | | -def session_run_tests(session, dir=None, toxargs=None): |
40 | | - """Run all tests for all directories (slow!)""" |
| 38 | +def run_test(session, dir, toxargs): |
41 | 39 | shutil.copy('config.py', dir) |
42 | 40 | session.chdir(dir) |
43 | 41 | session.run('tox', *(toxargs or [])) |
44 | 42 |
|
45 | 43 |
|
| 44 | +@nox.parametrize('dir', DIRS) |
| 45 | +def session_run_tests(session, dir=None, toxargs=None): |
| 46 | + """Run all tests for all directories (slow!)""" |
| 47 | + run_test(session, dir, toxargs) |
| 48 | + |
| 49 | + |
| 50 | +def session_run_one_test(session): |
| 51 | + dir = session.posargs[0] |
| 52 | + toxargs = session.posargs[1:] |
| 53 | + run_test(session, dir, toxargs) |
| 54 | + |
| 55 | + |
46 | 56 | @nox.parametrize('dir', DIRS) |
47 | 57 | def session_travis(session, dir=None): |
48 | 58 | """On travis, only run the py3.4 and cloudsql tests.""" |
|
0 commit comments