mailr12124 - /1.3/test_suite/unit_tests/_generic_fns/_structure/test_api_base.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 - 11:40:
Author: bugman
Date: Tue Jan  4 11:40:14 2011
New Revision: 12124

URL: http://svn.gna.org/viewcvs/relax?rev=12124&view=rev
Log:
The Test_api_base tests requiring Scientific python are now skipped if not 
installed.


Modified:
    1.3/test_suite/unit_tests/_generic_fns/_structure/test_api_base.py

Modified: 1.3/test_suite/unit_tests/_generic_fns/_structure/test_api_base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_generic_fns/_structure/test_api_base.py?rev=12124&r1=12123&r2=12124&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_generic_fns/_structure/test_api_base.py 
(original)
+++ 1.3/test_suite/unit_tests/_generic_fns/_structure/test_api_base.py Tue 
Jan  4 11:40:14 2011
@@ -27,13 +27,35 @@
 from unittest import TestCase
 
 # relax module imports.
+import dep_check
 from generic_fns.structure.api_base import Base_struct_API
 from generic_fns.structure.internal import Internal
 from generic_fns.structure.scientific import Scientific_data
+from status import Status; status = Status()
 
 
 class Test_api_base(TestCase):
     """Unit tests for the structural API base class."""
+
+    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_Scientific_method_args', 
'test_Scientific_objects']
+
+        # 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', 
'unit'])
+
+        # Execute the base class method.
+        super(Test_api_base, self).__init__(methodName)
+
+
 
     def format_method(self, name, args, varargs, varkw, defaults):
         """Method for formatting the method."""




Related Messages


Powered by MHonArc, Updated Tue Jan 04 12:00:02 2011