mailr12139 - /1.3/test_suite/system_tests/unit_vectors.py


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

Header


Content

Posted by edward on January 04, 2011 - 14:19:
Author: bugman
Date: Tue Jan  4 14:19:29 2011
New Revision: 12139

URL: http://svn.gna.org/viewcvs/relax?rev=12139&view=rev
Log:
The unit vector system tests using scientific python are now being skipped if 
the module is not installed.


Modified:
    1.3/test_suite/system_tests/unit_vectors.py

Modified: 1.3/test_suite/system_tests/unit_vectors.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/unit_vectors.py?rev=12139&r1=12138&r2=12139&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/unit_vectors.py (original)
+++ 1.3/test_suite/system_tests/unit_vectors.py Tue Jan  4 14:19:29 2011
@@ -31,6 +31,25 @@
 
 class Unit_vectors(SystemTestCase):
     """Class for testing the calculation of unit vectors."""
+
+    def __init__(self, methodName='runTest'):
+        """Skip scientific Python tests if not installed.
+
+        @keyword methodName:    The name of the test.
+        @type methodName:       str
+        """
+
+        # Scientific python tests.
+        scientific_tests = ['test_calc_unit_vectors1', 
'test_calc_unit_vectors2']
+
+        # Missing module.
+        if methodName in scientific_tests and not 
dep_check.scientific_module:
+            # Store in the status object.
+            status.skipped_tests.append([methodName, 'Scientific Python', 
'system'])
+
+        # Execute the base class method.
+        super(Structure, self).__init__(methodName)
+
 
     def setUp(self):
         """Set up for all the functional tests."""




Related Messages


Powered by MHonArc, Updated Tue Jan 04 14:40:02 2011