diff options
author | Baptiste Mispelon <bmispelon@gmail.com> | 2019-11-30 22:10:16 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-12-09 13:47:12 +0100 |
commit | 9e565386d3fafc8cc15d07095e50d574e5f53802 (patch) | |
tree | 230529a4e6c62c4e90e7e05f8561e4f2481fcf80 /tests/runtests.py | |
parent | f46452638885d89cacfca6831e0b9982c87b6527 (diff) | |
download | django-9e565386d3fafc8cc15d07095e50d574e5f53802.tar.gz |
Fixed #27430 -- Added -b/--buffer option to DiscoverRunner.
Diffstat (limited to 'tests/runtests.py')
-rwxr-xr-x | tests/runtests.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/runtests.py b/tests/runtests.py index 293396f96c..1282538a6d 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -281,7 +281,7 @@ class ActionSelenium(argparse.Action): def django_tests(verbosity, interactive, failfast, keepdb, reverse, test_labels, debug_sql, parallel, tags, exclude_tags, - test_name_patterns, start_at, start_after, pdb): + test_name_patterns, start_at, start_after, pdb, buffer): state = setup(verbosity, test_labels, parallel, start_at, start_after) extra_tests = [] @@ -302,6 +302,7 @@ def django_tests(verbosity, interactive, failfast, keepdb, reverse, exclude_tags=exclude_tags, test_name_patterns=test_name_patterns, pdb=pdb, + buffer=buffer, ) failures = test_runner.run_tests( test_labels or get_installed(), @@ -497,6 +498,10 @@ if __name__ == "__main__": '--pdb', action='store_true', help='Runs the PDB debugger on error or failure.' ) + parser.add_argument( + '-b', '--buffer', action='store_true', + help='Discard output of passing tests.', + ) if PY37: parser.add_argument( '-k', dest='test_name_patterns', action='append', @@ -563,7 +568,7 @@ if __name__ == "__main__": options.debug_sql, options.parallel, options.tags, options.exclude_tags, getattr(options, 'test_name_patterns', None), - options.start_at, options.start_after, options.pdb, + options.start_at, options.start_after, options.pdb, options.buffer, ) if failures: sys.exit(1) |