mailr18789 - /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 March 12, 2013 - 11:08:
Author: bugman
Date: Tue Mar 12 11:08:39 2013
New Revision: 18789

URL: http://svn.gna.org/viewcvs/relax?rev=18789&view=rev
Log:
Fixes for the unit test package __all__ list checking.

Now only *.py files and directories are checked.  In some cases other files 
could be present in
the packages, for example the object files when compiling the C modules.  
These would cause the unit
tests to fail unnecessarily.


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=18789&r1=18788&r2=18789&view=diff
==============================================================================
--- trunk/test_suite/unit_tests/package_checking.py (original)
+++ trunk/test_suite/unit_tests/package_checking.py Tue Mar 12 11:08:39 2013
@@ -21,6 +21,7 @@
 
 # Python module imports.
 from os import F_OK, access, listdir, sep
+from os.path import isdir
 from re import search
 
 # relax module imports.
@@ -49,8 +50,8 @@
             if search("^\.", file):
                 continue
 
-            # Skip byte-compiled files.
-            if search("pyc$", file):
+            # Only check Python files and directories.
+            if not search("\.py$", file) and not isdir(file):
                 continue
 
             # Skip blacklisted files.




Related Messages


Powered by MHonArc, Updated Tue Mar 12 11:20:02 2013