mailr17803 - in /trunk/test_suite/system_tests: dasha.py palmer.py


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

Header


Content

Posted by edward on October 15, 2012 - 10:48:
Author: bugman
Date: Mon Oct 15 10:48:09 2012
New Revision: 17803

URL: http://svn.gna.org/viewcvs/relax?rev=17803&view=rev
Log:
Python 2.3- fixes - the Modelfree4 and Dasha system tests are now skipped if 
the subprocess module is missing.


Modified:
    trunk/test_suite/system_tests/dasha.py
    trunk/test_suite/system_tests/palmer.py

Modified: trunk/test_suite/system_tests/dasha.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/dasha.py?rev=17803&r1=17802&r2=17803&view=diff
==============================================================================
--- trunk/test_suite/system_tests/dasha.py (original)
+++ trunk/test_suite/system_tests/dasha.py Mon Oct 15 10:48:09 2012
@@ -28,6 +28,7 @@
 
 # relax module imports.
 from data import Relax_data_store; ds = Relax_data_store()
+import dep_check
 from generic_fns.interatomic import interatomic_loop
 from generic_fns.mol_res_spin import spin_loop
 from relax_io import test_binary
@@ -37,6 +38,22 @@
 
 class Dasha(SystemTestCase):
     """Class for testing various aspects specific to model-free analysis 
using the program 'Dasha'."""
+
+    def __init__(self, methodName='runTest'):
+        """Skip the tests if the subprocess module is not available (Python 
2.3 and earlier).
+
+        @keyword methodName:    The name of the test.
+        @type methodName:       str
+        """
+
+        # Execute the base class method.
+        super(Dasha, self).__init__(methodName)
+
+        # Missing module.
+        if not dep_check.subprocess_module:
+            # Store in the status object. 
+            status.skipped_tests.append([methodName, 'subprocess', 
self._skip_type])
+
 
     def setUp(self):
         """Set up for all the functional tests."""

Modified: trunk/test_suite/system_tests/palmer.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/palmer.py?rev=17803&r1=17802&r2=17803&view=diff
==============================================================================
--- trunk/test_suite/system_tests/palmer.py (original)
+++ trunk/test_suite/system_tests/palmer.py Mon Oct 15 10:48:09 2012
@@ -27,6 +27,7 @@
 
 # relax module imports.
 from data import Relax_data_store; ds = Relax_data_store()
+import dep_check
 from generic_fns import pipes
 from generic_fns.mol_res_spin import return_spin
 from relax_errors import RelaxError
@@ -37,6 +38,22 @@
 
 class Palmer(SystemTestCase):
     """Class for testing various aspects specific to model-free analysis 
using the program 'Modelfree4'."""
+
+    def __init__(self, methodName='runTest'):
+        """Skip the tests if the subprocess module is not available (Python 
2.3 and earlier).
+
+        @keyword methodName:    The name of the test.
+        @type methodName:       str
+        """
+
+        # Execute the base class method.
+        super(Palmer, self).__init__(methodName)
+
+        # Missing module.
+        if not dep_check.subprocess_module:
+            # Store in the status object. 
+            status.skipped_tests.append([methodName, 'subprocess', 
self._skip_type])
+
 
     def setUp(self):
         """Set up for all the functional tests."""




Related Messages


Powered by MHonArc, Updated Mon Oct 15 14:00:02 2012