Gary, You probably noticed that I've modified your code to return the status of the unit tests. This was a quick change that I made so that the --test-suite command line argument functions correctly in the 1.3.0 release. Do you think this will this cause any problems, especially for stand along operation? Also, do you know how we could get individual unit tests to run 'out of the box', i.e. you don't need to manually set any paths?
Cheers, Edward On 2/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Author: varioustoxins Date: Tue Feb 20 11:02:10 2007 New Revision: 3033 URL: http://svn.gna.org/viewcvs/relax?rev=3033&view=rev Log: changes to allow command line unit tests to run 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=3033&r1=3032&r2=3033&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/unit_test_runner.py (original) +++ 1.3/test_suite/unit_tests/unit_test_runner.py Tue Feb 20 11:02:10 2007 @@ -475,23 +475,35 @@ print 'unit test directory:', unit_test_directory print 'module paths: ', module_path print + # add UnitTestDirectory to python path backup_python_path = sys.path[:] - sys.path.insert(1,unit_test_directory) - sys.path.insert(1,system_directory) - + #sys.path.insert(1,unit_test_directory) + + # add SystemDirectory to python path + sys.path.pop(0) + sys.path.insert(0,system_directory) + + + print sys.path #iterate and load unit tests from module path finder = Test_finder(unit_test_directory) finder.scan_paths() if runner == None: runner = unittest.TextTestRunner() - # 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) + # restore sys path + sys.path=backup_python_path + # Return the result of all the tests. return results.wasSuccessful() _______________________________________________ relax (http://nmr-relax.com) This is the relax-commits mailing list [email protected] To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
_______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list [email protected] To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel

