Author: bugman Date: Sun Feb 18 08:01:39 2007 New Revision: 3022 URL: http://svn.gna.org/viewcvs/relax?rev=3022&view=rev Log: Modified the unit test runner to return True if the tests pass and Fail if they fail. Modified: 1.3/test_suite/unit_tests/unit_test_runner.py Modified: 1.3/test_suite/unit_tests/unit_test_runner.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/unit_test_runner.py?rev=3022&r1=3021&r2=3022&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/unit_test_runner.py (original) +++ 1.3/test_suite/unit_tests/unit_test_runner.py Sun Feb 18 08:01:39 2007 @@ -486,9 +486,15 @@ finder.scan_paths() if runner == None: runner = unittest.TextTestRunner() - runner.run(finder.suite) # add SystemDirectory to python path # iterate and load files to be tested + + # Run the unit tests and catch the TestResult object. + results = runner.run(finder.suite) + + # Return the result of all the tests. + return results.wasSuccessful() + if __name__ == '__main__': # print '1',get_module_relative_path('/A/B/C', ('/A/B',))