mailr19695 - /trunk/test_suite/unit_tests/package_checking.py


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

Header


Content

Posted by edward on May 17, 2013 - 10:47:
Author: bugman
Date: Fri May 17 10:47:20 2013
New Revision: 19695

URL: http://svn.gna.org/viewcvs/relax?rev=19695&view=rev
Log:
Fix for the package checking as part of the unit tests.

This was identified from the bug report #20820 (https://gna.org/bugs/?20820) 
submitted by Troels E.
Linnet (https://gna.org/users/tlinnet).

The problem was that on some systems, the full path is required for checking 
the presence of the
directories which are the sub-packages of the main package being checked.  
The result was that 
checking for the package in the __all__ list was skipped.

Note that this change does not fix the bug reported.


Modified:
    trunk/test_suite/unit_tests/package_checking.py

Modified: trunk/test_suite/unit_tests/package_checking.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/package_checking.py?rev=19695&r1=19694&r2=19695&view=diff
==============================================================================
--- trunk/test_suite/unit_tests/package_checking.py (original)
+++ trunk/test_suite/unit_tests/package_checking.py Fri May 17 10:47:20 2013
@@ -25,6 +25,7 @@
 from re import search
 
 # relax module imports.
+from status import Status; status = Status()
 from test_suite.unit_tests.base_classes import UnitTestCase
 
 
@@ -42,6 +43,9 @@
         files = listdir(self.package_path)
         skip = ['__init__.py']
         for file in files:
+            # The full path.
+            path = status.install_path + sep + self.package_name + sep + file
+
             # Files and directories to skip.
             if file in skip:
                 continue
@@ -51,7 +55,7 @@
                 continue
 
             # Only check Python files and directories.
-            if not search("\.py$", file) and not isdir(file):
+            if not search("\.py$", file) and not isdir(path):
                 continue
 
             # Skip blacklisted files.




Related Messages


Powered by MHonArc, Updated Fri May 17 11:00:01 2013