diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-08-11 09:23:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-08-11 09:23:00 +0400 |
commit | 1528e5c20a3aa87302b0df123070927178877713 (patch) | |
tree | 640042a04f2fb4b83a3c69b0c32d8666a5b0bb74 /tests | |
parent | eedc3834fe3736d68d35dee8c744ce2396e3f6b6 (diff) |
Run unittest.main() directly
Diffstat (limited to 'tests')
-rw-r--r-- | tests/python/bl_pyapi_mathutils.py | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/tests/python/bl_pyapi_mathutils.py b/tests/python/bl_pyapi_mathutils.py index d204e58dbd4..7354f559b95 100644 --- a/tests/python/bl_pyapi_mathutils.py +++ b/tests/python/bl_pyapi_mathutils.py @@ -1,8 +1,7 @@ # Apache License, Version 2.0 -# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_mathutils.py +# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_mathutils.py -- --verbose import unittest -from test import support from mathutils import Matrix, Vector from mathutils import kdtree import math @@ -291,19 +290,7 @@ class KDTreeTesting(unittest.TestCase): with self.assertRaises(RuntimeError): k.find(co) - -def test_main(): - try: - support.run_unittest(MatrixTesting) - support.run_unittest(VectorTesting) - support.run_unittest(KDTreeTesting) - except: - import traceback - traceback.print_exc() - - # alert CTest we failed - import sys - sys.exit(1) - if __name__ == '__main__': - test_main() + import sys + sys.argv = [__file__] + (sys.argv[sys.argv.index("--") + 1:] if "--" in sys.argv else []) + unittest.main() |