[conduit: 44/138] Run tests ourself instead of using unittest.main



commit 9f9cd86fc793506a9e9a2acea5bcf3b9dccc08cd
Author: John Carr <john carr unrouted co uk>
Date:   Wed Apr 29 10:23:46 2009 -0700

    Run tests ourself instead of using unittest.main
---
 test/soup/soup |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/test/soup/soup b/test/soup/soup
index 682b56f..f29c2af 100755
--- a/test/soup/soup
+++ b/test/soup/soup
@@ -9,6 +9,11 @@ from test_datatypes import *
 from test_dataprovider import *
 from test_synchronization import *
 
+import unittest
+
 if __name__ == "__main__":
-    import unittest
-    unittest.main()
+    loader = unittest.TestLoader()
+    suite = loader.loadTestsFromModule(__import__('__main__'))
+    runner = unittest.TextTestRunner(verbosity=2)
+    result = runner.run(suite)
+    sys.exit(not result.wasSuccessfull())



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]