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
relax-commits@xxxxxxx
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