mailr3783 - /1.3/test_suite/unit_tests/_prompt/test_sequence.py


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

Header


Content

Posted by edward on November 22, 2007 - 00:53:
Author: bugman
Date: Thu Nov 22 00:53:24 2007
New Revision: 3783

URL: http://svn.gna.org/viewcvs/relax?rev=3783&view=rev
Log:
Implemented the file arg unit test for the sequence.read() user function.


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

Modified: 1.3/test_suite/unit_tests/_prompt/test_sequence.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_sequence.py?rev=3783&r1=3782&r2=3783&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/test_sequence.py (original)
+++ 1.3/test_suite/unit_tests/_prompt/test_sequence.py Thu Nov 22 00:53:24 
2007
@@ -28,7 +28,7 @@
 from data import Data as relax_data_store
 from data_types import return_data_types
 from prompt.sequence import Sequence
-from relax_errors import RelaxError
+from relax_errors import RelaxStrError
 from test_suite.unit_tests.sequence_testing_base import Sequence_base_class
 
 # Set the variable sys.ps3 (this is required by the user functions).
@@ -52,4 +52,17 @@
     sequence_fns = Sequence(relax)
 
 
+    def test_read_argfail_file(self):
+        """Test the proper failure of the sequence.read() user function for 
the file argument."""
 
+        # Loop over the data types.
+        for data in return_data_types():
+            # Catch the str argument, and skip it.
+            if data[0] == 'str':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxStrError, self.sequence_fns.read, 
file=data[1])
+
+
+




Related Messages


Powered by MHonArc, Updated Thu Nov 22 01:00:27 2007