mailr6576 - /1.3/test_suite/unit_tests/unit_test_runner.py


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

Header


Content

Posted by edward on June 29, 2008 - 13:47:
Author: bugman
Date: Sun Jun 29 13:47:12 2008
New Revision: 6576

URL: http://svn.gna.org/viewcvs/relax?rev=6576&view=rev
Log:
Bug fix for the Unit_test_runner.

The get_module_relative_path() function was sometimes failing because of the 
format of the
package_path argument.  This should be a string but, when run from an outside 
directory, often this
path would already be split up into the segment path list.  The fix just 
catches this so that the
function doesn't try to segment the segmented list.


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=6576&r1=6575&r2=6576&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/unit_test_runner.py (original)
+++ 1.3/test_suite/unit_tests/unit_test_runner.py Sun Jun 29 13:47:12 2008
@@ -153,7 +153,10 @@
         root_paths = sys.path
     for root_path in root_paths:
         root_path = segment_path(os.path.abspath(root_path))
-        package_path = segment_path(os.path.abspath(package_path))
+
+        # Catch if the package path has already been converted to a segment 
list.
+        if type(package_path) != list:
+            package_path = segment_path(os.path.abspath(package_path))
 
         common_prefix = get_common_prefix(root_path, package_path)
         if common_prefix == root_path:




Related Messages


Powered by MHonArc, Updated Sun Jun 29 14:20:11 2008