mailr3750 - in /1.3/test_suite/unit_tests: _generic_fns/test_state.py _prompt/test_state.py state_testing_base.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:49:
Author: bugman
Date: Wed Nov 21 00:49:24 2007
New Revision: 3750

URL: http://svn.gna.org/viewcvs/relax?rev=3750&view=rev
Log:
Fix for the nasty function argument bug!


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

Modified: 1.3/test_suite/unit_tests/_generic_fns/test_state.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_generic_fns/test_state.py?rev=3750&r1=3749&r2=3750&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_generic_fns/test_state.py (original)
+++ 1.3/test_suite/unit_tests/_generic_fns/test_state.py Wed Nov 21 00:49:24 
2007
@@ -32,6 +32,5 @@
 class Test_state(State_base_class, TestCase):
     """Unit tests for the functions of the 'generic_fns.state' module."""
 
-    # Place the generic_fns.state functions into the class namespace.
-    load_state = state.load_state
-    save_state = state.save_state
+    # Place the generic_fns.state module into the class namespace.
+    state = state

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=3750&r1=3749&r2=3750&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:49:24 2007
@@ -44,16 +44,16 @@
 relax.interpreter = Container()
 relax.interpreter.intro = True
 
-# Instantiate the user function class.
-state = State(relax)
-
  
 class Test_state(State_base_class, TestCase):
     """Unit tests for the functions of the 'prompt.state' module."""
 
-    # Place the user functions into the class namespace, and rename them.
-    load_state = state.load
-    save_state = state.save
+    # Instantiate the user function class.
+    state = State(relax)
+
+    # Rename the user functions.
+    state.load_state = state.load
+    state.save_state = state.save
 
 
     def test_load_argfail_file(self):
@@ -66,7 +66,7 @@
                 continue
 
             # The argument test.
-            self.assertRaises(RelaxStrError, self.load_state, file=data[1])
+            self.assertRaises(RelaxStrError, self.state.load_state, 
file=data[1])
 
 
     def test_load_argfail_dir(self):
@@ -79,7 +79,7 @@
                 continue
 
             # The argument test.
-            self.assertRaises(RelaxNoneStrError, self.load_state, file='a', 
dir=data[1])
+            self.assertRaises(RelaxNoneStrError, self.state.load_state, 
file='a', dir=data[1])
 
 
 

Modified: 1.3/test_suite/unit_tests/state_testing_base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/state_testing_base.py?rev=3750&r1=3749&r2=3750&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/state_testing_base.py (original)
+++ 1.3/test_suite/unit_tests/state_testing_base.py Wed Nov 21 00:49:24 2007
@@ -71,7 +71,7 @@
         """
 
         # Save the state.
-        self.save_state(file='test')
+        self.state.save_state(file='test')
 
         # Reset the relax data store.
         relax_data_store.__reset__()
@@ -82,7 +82,7 @@
         self.assert_(not hasattr(relax_data_store, 'y'))
 
         # Load the state.
-        self.load_state(file='test')
+        self.state.load_state(file='test')
 
         # Test the contents of the restored singleton.
         self.assertEqual(relax_data_store.keys(), ['orig'])
@@ -97,4 +97,4 @@
         """
 
         # Save the state.
-        self.save_state(file='test')
+        self.state.save_state(file='test')




Related Messages


Powered by MHonArc, Updated Wed Nov 21 01:00:10 2007