mailr4357 - /1.3/test_suite/system_tests/__init__.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on January 05, 2008 - 19:09:
Author: bugman
Date: Sat Jan  5 19:09:42 2008
New Revision: 4357

URL: http://svn.gna.org/viewcvs/relax?rev=4357&view=rev
Log:
Bug fix for the new system/functional test framework.

Now all tests from all TestCase instances are run.


Modified:
    1.3/test_suite/system_tests/__init__.py

Modified: 1.3/test_suite/system_tests/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/__init__.py?rev=4357&r1=4356&r2=4357&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/__init__.py (original)
+++ 1.3/test_suite/system_tests/__init__.py Sat Jan  5 19:09:42 2008
@@ -21,7 +21,7 @@
 
###############################################################################
 
 # Python module imports.
-from unittest import TestLoader
+from unittest import TestLoader, TestSuite
 
 # relax module imports.
 from test_suite.relax_test_runner import RelaxTestRunner
@@ -60,16 +60,21 @@
     def run(self):
         """Function for running all of the system/functional tests."""
 
-        # Create the test suite (add your new TestCase classes here).
-        suite = TestLoader().loadTestsFromTestCase(Test_pipe_create)
-        suite = TestLoader().loadTestsFromTestCase(Mf)
+        # Create an array of test suites (add your new TestCase classes 
here).
+        suite_array = []
+        
suite_array.append(TestLoader().loadTestsFromTestCase(Test_pipe_create))
+        suite_array.append(TestLoader().loadTestsFromTestCase(Mf))
 
         # Add the relax namespace to each TestCase object.
-        for test in suite._tests:
-            test.relax = self.relax
+        for i in xrange(len(suite_array)):
+            for test in suite_array[i]._tests:
+                test.relax = self.relax
+
+        # Group all tests together.
+        full_suite = TestSuite(suite_array)
 
         # Run the test suite.
-        results = RelaxTestRunner().run(suite)
+        results = RelaxTestRunner().run(full_suite)
 
         # Return the status of the tests.
         return results.wasSuccessful()




Related Messages


Powered by MHonArc, Updated Sat Jan 05 19:20:16 2008