diff options
author | anatoly techtonik <techtonik@gmail.com> | 2014-03-21 08:23:36 (GMT) |
---|---|---|
committer | anatoly techtonik <techtonik@gmail.com> | 2014-03-21 08:23:36 (GMT) |
commit | 9cbc6fcdd1a84d9af9bd9eb371f1522991caf73d (patch) | |
tree | d8d306ca1d4d8f543555511ed0bfc578c26d7ac6 /src/engine/SCons/Variables | |
parent | ffd96219e173cdc643a28fe44d344e274a156ce0 (diff) | |
download | SCons-9cbc6fcdd1a84d9af9bd9eb371f1522991caf73d.zip SCons-9cbc6fcdd1a84d9af9bd9eb371f1522991caf73d.tar.gz SCons-9cbc6fcdd1a84d9af9bd9eb371f1522991caf73d.tar.bz2 |
Switch unit tests to configurable runner
Diffstat (limited to 'src/engine/SCons/Variables')
-rw-r--r-- | src/engine/SCons/Variables/BoolVariableTests.py | 5 | ||||
-rw-r--r-- | src/engine/SCons/Variables/EnumVariableTests.py | 5 | ||||
-rw-r--r-- | src/engine/SCons/Variables/ListVariableTests.py | 5 | ||||
-rw-r--r-- | src/engine/SCons/Variables/PackageVariableTests.py | 5 | ||||
-rw-r--r-- | src/engine/SCons/Variables/PathVariableTests.py | 5 | ||||
-rw-r--r-- | src/engine/SCons/Variables/VariablesTests.py | 5 |
6 files changed, 18 insertions, 12 deletions
diff --git a/src/engine/SCons/Variables/BoolVariableTests.py b/src/engine/SCons/Variables/BoolVariableTests.py index 8ffb079..7110f6f 100644 --- a/src/engine/SCons/Variables/BoolVariableTests.py +++ b/src/engine/SCons/Variables/BoolVariableTests.py @@ -26,6 +26,8 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import sys import unittest +import TestUnit + import SCons.Errors import SCons.Variables @@ -117,8 +119,7 @@ class BoolVariableTestCase(unittest.TestCase): if __name__ == "__main__": suite = unittest.makeSuite(BoolVariableTestCase, 'test_') - if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + TestUnit.run(suite) # Local Variables: # tab-width:4 diff --git a/src/engine/SCons/Variables/EnumVariableTests.py b/src/engine/SCons/Variables/EnumVariableTests.py index f4b600d..931dfe2 100644 --- a/src/engine/SCons/Variables/EnumVariableTests.py +++ b/src/engine/SCons/Variables/EnumVariableTests.py @@ -26,6 +26,8 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import sys import unittest +import TestUnit + import SCons.Errors import SCons.Variables @@ -194,8 +196,7 @@ class EnumVariableTestCase(unittest.TestCase): if __name__ == "__main__": suite = unittest.makeSuite(EnumVariableTestCase, 'test_') - if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + TestUnit.run(suite) # Local Variables: # tab-width:4 diff --git a/src/engine/SCons/Variables/ListVariableTests.py b/src/engine/SCons/Variables/ListVariableTests.py index 4959f69..adfd353 100644 --- a/src/engine/SCons/Variables/ListVariableTests.py +++ b/src/engine/SCons/Variables/ListVariableTests.py @@ -27,6 +27,8 @@ import copy import sys import unittest +import TestUnit + import SCons.Errors import SCons.Variables @@ -124,8 +126,7 @@ class ListVariableTestCase(unittest.TestCase): if __name__ == "__main__": suite = unittest.makeSuite(ListVariableTestCase, 'test_') - if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + TestUnit.run(suite) # Local Variables: # tab-width:4 diff --git a/src/engine/SCons/Variables/PackageVariableTests.py b/src/engine/SCons/Variables/PackageVariableTests.py index 2a93348..3aa411d 100644 --- a/src/engine/SCons/Variables/PackageVariableTests.py +++ b/src/engine/SCons/Variables/PackageVariableTests.py @@ -30,6 +30,8 @@ import SCons.Errors import SCons.Variables import TestCmd +import TestUnit + class PackageVariableTestCase(unittest.TestCase): def test_PackageVariable(self): @@ -114,8 +116,7 @@ class PackageVariableTestCase(unittest.TestCase): if __name__ == "__main__": suite = unittest.makeSuite(PackageVariableTestCase, 'test_') - if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + TestUnit.run(suite) # Local Variables: # tab-width:4 diff --git a/src/engine/SCons/Variables/PathVariableTests.py b/src/engine/SCons/Variables/PathVariableTests.py index 084154b..4266759 100644 --- a/src/engine/SCons/Variables/PathVariableTests.py +++ b/src/engine/SCons/Variables/PathVariableTests.py @@ -31,6 +31,8 @@ import SCons.Errors import SCons.Variables import TestCmd +import TestUnit + class PathVariableTestCase(unittest.TestCase): def test_PathVariable(self): @@ -227,8 +229,7 @@ class PathVariableTestCase(unittest.TestCase): if __name__ == "__main__": suite = unittest.makeSuite(PathVariableTestCase, 'test_') - if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + TestUnit.run(suite) # Local Variables: # tab-width:4 diff --git a/src/engine/SCons/Variables/VariablesTests.py b/src/engine/SCons/Variables/VariablesTests.py index ad46bd6..d2110c1 100644 --- a/src/engine/SCons/Variables/VariablesTests.py +++ b/src/engine/SCons/Variables/VariablesTests.py @@ -25,7 +25,9 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import sys import unittest + import TestSCons +import TestUnit import SCons.Variables import SCons.Subst @@ -655,8 +657,7 @@ if __name__ == "__main__": for tclass in tclasses: names = unittest.getTestCaseNames(tclass, 'test_') suite.addTests(list(map(tclass, names))) - if not unittest.TextTestRunner().run(suite).wasSuccessful(): - sys.exit(1) + TestUnit.run(suite) # Local Variables: # tab-width:4 |