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-21 13:55:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-08-21 13:56:21 +0400
commit7ef925752cbfad510197197b5317d8cc4fd55c17 (patch)
treee716bc61e10603b938589b4c51566de9e0879942 /tests
parent569eafc7454df6e0d0c0d29c0002b7da197d7dbc (diff)
Tests: remove support.run_unittest
Diffstat (limited to 'tests')
-rw-r--r--tests/python/bl_pyapi_units.py18
1 files changed, 4 insertions, 14 deletions
diff --git a/tests/python/bl_pyapi_units.py b/tests/python/bl_pyapi_units.py
index a09a25e4b71..128cc100b25 100644
--- a/tests/python/bl_pyapi_units.py
+++ b/tests/python/bl_pyapi_units.py
@@ -1,8 +1,7 @@
# Apache License, Version 2.0
-# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_units.py
+# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_units.py -- --verbose
import unittest
-from test import support
from bpy.utils import units
@@ -70,16 +69,7 @@ class UnitsTesting(unittest.TestCase):
"\"%s\", expected \"%s\"" % (usys, utype, val, prec, sep, compat, opt_str, output))
-def test_main():
- try:
- support.run_unittest(UnitsTesting)
- 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()