Commit 96b80da8e785a75d3fae02469e25cddcea02e88c
1 parent
298c9c67
Allow specifying test labels for runtests.py
Showing
1 changed file
with
5 additions
and
1 deletions
| ... | ... | @@ -42,7 +42,11 @@ def main(): |
| 42 | 42 | if django.VERSION >= (1, 7): |
| 43 | 43 | django.setup() |
| 44 | 44 | runner = DiscoverRunner(failfast=True, verbosity=1) |
| 45 | - failures = runner.run_tests(['testapp'], interactive=True) | |
| 45 | + if len(sys.argv) > 1: | |
| 46 | + test_labels = sys.argv[1:] | |
| 47 | + else: | |
| 48 | + test_labels = ['testapp'] | |
| 49 | + failures = runner.run_tests(test_labels, interactive=True) | |
| 46 | 50 | sys.exit(failures) |
| 47 | 51 | |
| 48 | 52 | if __name__ == '__main__': | ... | ... |
Please
register
or
login
to post a comment