mailr3741 - /1.3/test_suite/unit_tests/_prompt/test_state.py


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

Header


Content

Posted by edward on November 21, 2007 - 00:08:
Author: bugman
Date: Wed Nov 21 00:08:36 2007
New Revision: 3741

URL: http://svn.gna.org/viewcvs/relax?rev=3741&view=rev
Log:
Implemented the dir arg unit test for the state.load() user function.


Modified:
    1.3/test_suite/unit_tests/_prompt/test_state.py

Modified: 1.3/test_suite/unit_tests/_prompt/test_state.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_state.py?rev=3741&r1=3740&r2=3741&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/test_state.py (original)
+++ 1.3/test_suite/unit_tests/_prompt/test_state.py Wed Nov 21 00:08:36 2007
@@ -28,7 +28,7 @@
 from test_suite.unit_tests.state_testing_base import State_base_class
 from data_types import return_data_types
 from prompt.state import State
-from relax_errors import RelaxStrError
+from relax_errors import RelaxNoneStrError, RelaxStrError
 
 
 # Set the variable sys.ps3 (this is required by the user functions).
@@ -65,4 +65,17 @@
             self.assertRaises(RelaxStrError, state.load, file=data[1])
 
 
+    def test_load_argfail_dir(self):
+        """Test the proper failure of the state.load() user function for the 
dir argument."""
 
+        # Loop over the data types.
+        for data in return_data_types():
+            # Catch the None and str arguments, and skip them.
+            if data[0] == 'None' and data[0] == 'str':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxNoneStrError, state.load, file='a', 
dir=data[1])
+
+
+




Related Messages


Powered by MHonArc, Updated Wed Nov 21 00:20:29 2007