""" 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 <info@intra2net>
"""
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
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