Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-08-11 09:23:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-08-11 09:23:00 +0400
commit1528e5c20a3aa87302b0df123070927178877713 (patch)
tree640042a04f2fb4b83a3c69b0c32d8666a5b0bb74 /tests
parenteedc3834fe3736d68d35dee8c744ce2396e3f6b6 (diff)
Run unittest.main() directly
Diffstat (limited to 'tests')
-rw-r--r--tests/python/bl_pyapi_mathutils.py21
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()