mailr6579 - /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 June 29, 2008 - 14:29:
Author: bugman
Date: Sun Jun 29 14:29:40 2008
New Revision: 6579

URL: http://svn.gna.org/viewcvs/relax?rev=6579&view=rev
Log:
Wrote 3 arg unit tests for the sequence.copy() 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=6579&r1=6578&r2=6579&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/test_sequence.py (original)
+++ 1.3/test_suite/unit_tests/_prompt/test_sequence.py Sun Jun 29 14:29:40 
2008
@@ -26,7 +26,7 @@
 # relax module imports.
 from data import Relax_data_store; ds = Relax_data_store()
 from prompt.sequence import Sequence
-from relax_errors import RelaxBinError, RelaxBoolError, RelaxNoneIntError, 
RelaxNoneStrError, RelaxStrError
+from relax_errors import RelaxError, RelaxBinError, RelaxBoolError, 
RelaxNoneIntError, RelaxNoneStrError, RelaxStrError
 from test_suite.unit_tests.sequence_testing_base import Sequence_base_class
 
 # Unit test imports.
@@ -41,6 +41,39 @@
     sequence_fns = Sequence(fake_relax.fake_instance())
 
 
+    def test_copy_argfail_pipe_from(self):
+        """The pipe_from arg test of the sequence.copy() user function."""
+
+        # Loop over the data types.
+        for data in DATA_TYPES:
+            # Catch the None and str arguments, and skip them.
+            if data[0] == 'None' or data[0] == 'str':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxNoneStrError, self.sequence_fns.copy, 
pipe_from=data[1])
+
+
+    def test_copy_argfail_pipe_to(self):
+        """The pipe_to arg test of the sequence.copy() user function."""
+
+        # Loop over the data types.
+        for data in DATA_TYPES:
+            # Catch the None and str arguments, and skip them.
+            if data[0] == 'None' or data[0] == 'str':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxNoneStrError, self.sequence_fns.copy, 
pipe_to=data[1])
+
+
+    def test_copy_argfail_both_pipes(self):
+        """The pipe_from and pipe_to arg test of the sequence.copy() user 
function."""
+
+        # Test that both cannot be None (the default)!
+        self.assertRaises(RelaxError, self.sequence_fns.copy)
+
+
     def test_display_argfail_sep(self):
         """The proper failure of the sequence.display() user function for 
the sep argument."""
 




Related Messages


Powered by MHonArc, Updated Sun Jun 29 14:40:16 2008