mailr9371 - /1.3/test_suite/unit_tests/_prompt/test_value.py


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

Header


Content

Posted by edward on August 21, 2009 - 21:08:
Author: bugman
Date: Fri Aug 21 21:08:00 2009
New Revision: 9371

URL: http://svn.gna.org/viewcvs/relax?rev=9371&view=rev
Log:
Fixes for the test_set_argfail_param() unit test.


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

Modified: 1.3/test_suite/unit_tests/_prompt/test_value.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_value.py?rev=9371&r1=9370&r2=9371&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/test_value.py (original)
+++ 1.3/test_suite/unit_tests/_prompt/test_value.py Fri Aug 21 21:08:00 2009
@@ -25,7 +25,7 @@
 
 # relax module imports.
 from prompt.value import Value
-from relax_errors import RelaxError, RelaxListFloatStrError, 
RelaxListStrError, RelaxNoneFloatStrListError, RelaxNoneStrError, 
RelaxNoneStrListError
+from relax_errors import RelaxError, RelaxListFloatStrError, 
RelaxListStrError, RelaxNoneFloatStrListError, RelaxNoneStrError, 
RelaxNoneStrListStrError
 from test_suite.unit_tests.value_testing_base import Value_base_class
 
 # Unit test imports.
@@ -70,23 +70,11 @@
         # 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':
+            if data[0] == 'None' or data[0] == 'str' or data[0] == 'str 
list':
                 continue
 
-            # Catch the string list arguments.
-            if data[0] == 'str list':
-                if len(data[1]) != 1:
-                    self.assertRaises(RelaxError, self.value_fns.set, 
param=data[1], val=[1.0])
-                else:
-                    self.assertRaises(RelaxError, self.value_fns.set, 
param=data[1], val=[1.0, 2.0])
-
-            # Catch all other list arguments.
-            elif isinstance(data[1], list):
-                self.assertRaises(RelaxListStrError, self.value_fns.set, 
param=data[1], val=None)
-
-            # All other arguments.
-            else:
-                self.assertRaises(RelaxNoneStrListError, self.value_fns.set, 
param=data[1], val=None)
+            # The argument test.
+            self.assertRaises(RelaxNoneStrListStrError, self.value_fns.set, 
param=data[1], val=None)
 
 
     def test_set_argfail_spin_id(self):




Related Messages


Powered by MHonArc, Updated Fri Aug 21 21:20:03 2009