mailr9389 - in /1.3: prompt/spin.py test_suite/unit_tests/_prompt/test_spin.py


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

Header


Content

Posted by edward on August 26, 2009 - 10:57:
Author: bugman
Date: Wed Aug 26 10:57:24 2009
New Revision: 9389

URL: http://svn.gna.org/viewcvs/relax?rev=9389&view=rev
Log:
Fix for the spin.number() user function.

The number can be None to reset the values.  This is used in a system test.


Modified:
    1.3/prompt/spin.py
    1.3/test_suite/unit_tests/_prompt/test_spin.py

Modified: 1.3/prompt/spin.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/spin.py?rev=9389&r1=9388&r2=9389&view=diff
==============================================================================
--- 1.3/prompt/spin.py (original)
+++ 1.3/prompt/spin.py Wed Aug 26 10:57:24 2009
@@ -350,7 +350,7 @@
 
         # The argument checks.
         check.is_str(spin_id, 'spin identification string', can_be_none=True)
-        check.is_int(number, 'new spin number')
+        check.is_int(number, 'new spin number', can_be_none=True)
         check.is_bool(force, 'force flag')
 
         # Execute the functional code.

Modified: 1.3/test_suite/unit_tests/_prompt/test_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_spin.py?rev=9389&r1=9388&r2=9389&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/test_spin.py (original)
+++ 1.3/test_suite/unit_tests/_prompt/test_spin.py Wed Aug 26 10:57:24 2009
@@ -293,8 +293,8 @@
         # Loop over the data types.
         for data in DATA_TYPES:
             # Catch the None, int and bin arguments, and skip them.
-            if data[0] == 'int' or data[0] == 'bin':
-                continue
-
-            # The argument test.
-            self.assertRaises(RelaxIntError, self.spin_fns.number, 
spin_id='@111', number=data[1])
+            if data[0] == 'None' or data[0] == 'int' or data[0] == 'bin':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxNoneIntError, self.spin_fns.number, 
spin_id='@111', number=data[1])




Related Messages


Powered by MHonArc, Updated Wed Aug 26 11:20:03 2009