mailr9435 - in /1.3: data/__init__.py generic_fns/__init__.py prompt/__init__.py 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 September 02, 2009 - 20:24:
Author: bugman
Date: Wed Sep  2 20:24:47 2009
New Revision: 9435

URL: http://svn.gna.org/viewcvs/relax?rev=9435&view=rev
Log:
Added a check for non-existent modules, and updated the __all__ lists.


Modified:
    1.3/data/__init__.py
    1.3/generic_fns/__init__.py
    1.3/prompt/__init__.py
    1.3/test_suite/unit_tests/package_checking.py

Modified: 1.3/data/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/data/__init__.py?rev=9435&r1=9434&r2=9435&view=diff
==============================================================================
--- 1.3/data/__init__.py (original)
+++ 1.3/data/__init__.py Wed Sep  2 20:24:47 2009
@@ -40,7 +40,6 @@
 __all__ = [ 'align_tensor',
             'data_classes',
             'diff_tensor',
-            'main',
             'mol_res_spin',
             'pipe_container',
             'prototype',

Modified: 1.3/generic_fns/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/__init__.py?rev=9435&r1=9434&r2=9435&view=diff
==============================================================================
--- 1.3/generic_fns/__init__.py (original)
+++ 1.3/generic_fns/__init__.py Wed Sep  2 20:24:47 2009
@@ -30,15 +30,12 @@
             'frame_order',
             'frq',
             'grace',
-            'intensity',
-            'main',
             'minimise',
             'model_selection',
             'mol_res_spin',
             'molmol',
             'monte_carlo',
             'noesy',
-            'nuclei',
             'palmer',
             'pcs',
             'pipes',
@@ -48,7 +45,6 @@
             'relax_re',
             'reset',
             'results',
-            'runs',
             'selection',
             'sequence',
             'spectrum',

Modified: 1.3/prompt/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/__init__.py?rev=9435&r1=9434&r2=9435&view=diff
==============================================================================
--- 1.3/prompt/__init__.py (original)
+++ 1.3/prompt/__init__.py Wed Sep  2 20:24:47 2009
@@ -49,7 +49,6 @@
            'monte_carlo',
            'n_state_model',
            'noe',
-           'nuclei',
            'palmer',
            'pcs',
            'pipe',
@@ -60,7 +59,6 @@
            'reset',
            'residue',
            'results',
-           'rw',
            'select',
            'sequence',
            'spectrum',

Modified: 1.3/test_suite/unit_tests/package_checking.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/package_checking.py?rev=9435&r1=9434&r2=9435&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/package_checking.py (original)
+++ 1.3/test_suite/unit_tests/package_checking.py Wed Sep  2 20:24:47 2009
@@ -21,7 +21,7 @@
 
###############################################################################
 
 # Python module imports.
-from os import listdir
+from os import F_OK, access, listdir, sep
 from re import search
 from unittest import TestCase
 
@@ -34,7 +34,7 @@
 
         print("The %s.__all__ list: %s" % (self.package_name, 
self.package.__all__))
 
-        # Loop over all modules.
+        # Loop over all files.
         files = listdir(self.package_path)
         for file in files:
             # Only look at the '*.py' files.
@@ -50,7 +50,27 @@
 
             # Print out.
             print("\nFile:   %s" % file)
-            print("Module: %s" % module)
+            print("Checking module: %s" % module)
 
             # Check if the module is in __all__.
             self.assert_(module in self.package.__all__)
+
+        # Loop over all modules.
+        for module in self.package.__all__:
+            # The file name.
+            file = module + '.py'
+
+            # Print out.
+            print("\nModule: %s" % module)
+            print("Checking file:   %s" % file)
+
+            # Check for the file.
+            if access(self.package_path + sep + file, F_OK):
+                continue
+
+            # Check for the package.
+            if access(self.package_path + sep + module, F_OK):
+                continue
+
+            # Doesn't exist, so fail.
+            self.fail()




Related Messages


Powered by MHonArc, Updated Wed Sep 02 21:20:10 2009