Author: bugman Date: Wed Nov 21 00:22:26 2007 New Revision: 3746 URL: http://svn.gna.org/viewcvs/relax?rev=3746&view=rev Log: Updated the prompt.state and generic_fns.state unit tests to test the correct functions. 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=3746&r1=3745&r2=3746&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:22:26 2007 @@ -32,5 +32,6 @@ class Test_state(State_base_class, TestCase): """Unit tests for the functions of the 'generic_fns.state' module.""" - # Place the generic_fns.state module into the class namespace. - state = state + # Place the generic_fns.state functions into the class namespace. + load_state = state.load_state + save_state = state.save_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=3746&r1=3745&r2=3746&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:22:26 2007 @@ -44,12 +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.""" - # Instantiate the user function class. - state = State(relax) + # Place the user functions into the class namespace, and rename them. + load_state = state.load + save_state = state.save def test_load_argfail_file(self): 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=3746&r1=3745&r2=3746&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:22:26 2007 @@ -25,7 +25,6 @@ # relax module imports. from data import Data as relax_data_store -from generic_fns.state import load_state, save_state @@ -72,7 +71,7 @@ """ # Save the state. - save_state('test') + self.save_state('test') # Reset the relax data store. relax_data_store.__reset__() @@ -83,7 +82,7 @@ self.assert_(not hasattr(relax_data_store, 'y')) # Load the state. - load_state('test') + self.load_state('test') # Test the contents of the restored singleton. self.assertEqual(relax_data_store.keys(), ['orig']) @@ -98,4 +97,4 @@ """ # Save the state. - save_state('test') + self.save_state('test')