mailr19278 - /branches/relax_disp/test_suite/unit_tests/_prompt/test_relax_disp.py


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

Header


Content

Posted by edward on March 27, 2013 - 19:50:
Author: bugman
Date: Wed Mar 27 19:50:34 2013
New Revision: 19278

URL: http://svn.gna.org/viewcvs/relax?rev=19278&view=rev
Log:
Converted the prompt unit tests for relaxation dispersion to the current 
relax design.


Modified:
    branches/relax_disp/test_suite/unit_tests/_prompt/test_relax_disp.py

Modified: branches/relax_disp/test_suite/unit_tests/_prompt/test_relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/unit_tests/_prompt/test_relax_disp.py?rev=19278&r1=19277&r2=19278&view=diff
==============================================================================
--- branches/relax_disp/test_suite/unit_tests/_prompt/test_relax_disp.py 
(original)
+++ branches/relax_disp/test_suite/unit_tests/_prompt/test_relax_disp.py Wed 
Mar 27 19:50:34 2013
@@ -24,18 +24,29 @@
 from unittest import TestCase
 
 # relax module imports.
-from prompt.relax_disp import Relax_disp
-from relax_errors import RelaxNoneNumError, RelaxNumError, RelaxStrError
+from prompt.interpreter import Interpreter
+from lib.errors import RelaxNoneNumError, RelaxNumError, RelaxStrError
 
 # Unit test imports.
-from data_types import DATA_TYPES
+from test_suite.unit_tests._prompt.data_types import DATA_TYPES
 
 
 class Test_relax_disp(TestCase):
     """Unit tests for the functions of the 'prompt.relax_disp' module."""
 
-    # Instantiate the user function class.
-    relax_disp_fns = Relax_disp()
+    def __init__(self, methodName=None):
+        """Set up the test case class for the system tests."""
+
+        # Execute the base __init__ methods.
+        super(Test_relax_disp, self).__init__(methodName)
+
+        # Load the interpreter.
+        self.interpreter = Interpreter(show_script=False, quit=False, 
raise_relax_error=True)
+        self.interpreter.populate_self()
+        self.interpreter.on(verbose=False)
+
+        # Alias the user function class.
+        self.relax_fit_fns = self.interpreter.relax_fit
 
 
     def test_relax_calc_r2eff_argfail_exp_type(self):
@@ -49,6 +60,7 @@
 
             # The argument test.
             self.assertRaises(RelaxStrError, self.relax_disp_fns.calc_r2eff, 
exp_type=data[1])
+
 
     def test_relax_calc_r2eff_argfail_id(self):
         """The id arg test of the relax_disp.relax_calc_r2eff() user 
function."""




Related Messages


Powered by MHonArc, Updated Wed Mar 27 20:00:02 2013