From 1003fb8ffbfbd836bb1faf02492c21863528999b Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Tue, 26 Jul 2016 10:46:46 +0200 Subject: [PATCH] tried to add test_deltatar.DeltaTarBz2[Stream]Test to run_long_tests but failed --- run_long_tests.py | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/run_long_tests.py b/run_long_tests.py index a3093a8..9b1713b 100755 --- a/run_long_tests.py +++ b/run_long_tests.py @@ -2,15 +2,20 @@ """ Run the longer tests, that are too long for unittests -Currently, there are 2 such tests: +Currently, there are 3 such tests: +- test_deltatar.DeltaTarBz2[Stream]Test (2 unittests) - test_volume_size_accuracy - test_volume_split (runs forever) +TODO: +- actually get unittests to run, did not manage sofar + .. codeauthor:: Intra2net AG """ import sys - +from unittest import TextTestRunner +from testing.test_deltatar import DeltaTarBz2Test, DeltaTarBz2StreamTest from testing import test_volume_size_accuracy from testing import test_volume_split @@ -21,15 +26,27 @@ def main(): see module doc for more info """ + # params for following scripts fast_fail = False print_everything = False + # run slow bz2 unittests + # this currently fails because python cannot find a "runTest" in tests + #test_runner = TextTestRunner(failfast=fast_fail, + # verbosity=1+int(print_everything)) + #test_runner.run(DeltaTarBz2Test()) + #test_runner.run(DeltaTarBz2StreamTest()) + n_errs = test_volume_size_accuracy.run_all_tests(fast_fail, print_everything) if fast_fail and n_errs > 0: return n_errs - n_errs += test_volume_split.run_forever(fast_fail, print_everything) + # if this returns, then only if fast_fail is set and first error occurred + test_volume_split.test_forever(fast_fail, print_everything) + n_errs += 1 + + # done return n_errs -- 1.7.1