Author: bugman Date: Wed Nov 21 12:27:19 2007 New Revision: 3756 URL: http://svn.gna.org/viewcvs/relax?rev=3756&view=rev Log: Merged revisions 3733-3755 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3 ........ r3733 | bugman | 2007-11-20 23:26:38 +0100 (Tue, 20 Nov 2007) | 3 lines Created by copying a base class for testing both the prompt.state and generic_fns.state modules. ........ r3734 | bugman | 2007-11-20 23:36:39 +0100 (Tue, 20 Nov 2007) | 3 lines The generic_fns.state module unit test code is now using the base class. ........ r3735 | bugman | 2007-11-20 23:41:25 +0100 (Tue, 20 Nov 2007) | 6 lines Renamed all the unit test directories to start with an underscore. This is to fix issues with the importing of modules. These directories were clashing with the real relax directories, making the relax modules in them inaccessible to certain unit tests. ........ r3736 | bugman | 2007-11-20 23:42:48 +0100 (Tue, 20 Nov 2007) | 3 lines Removed some unused imports. ........ r3737 | bugman | 2007-11-20 23:43:19 +0100 (Tue, 20 Nov 2007) | 3 lines Removed some more unused imports. ........ r3738 | bugman | 2007-11-20 23:49:43 +0100 (Tue, 20 Nov 2007) | 3 lines A few more unused imported eliminated. ........ r3739 | bugman | 2007-11-20 23:58:12 +0100 (Tue, 20 Nov 2007) | 5 lines Added the framework for the unit tests of the prompt.state module. This inherits 2 unit tests already (which pass). ........ r3740 | bugman | 2007-11-21 00:05:14 +0100 (Wed, 21 Nov 2007) | 3 lines Implemented the file arg unit test for the state.load() user function. ........ r3741 | bugman | 2007-11-21 00:08:36 +0100 (Wed, 21 Nov 2007) | 3 lines Implemented the dir arg unit test for the state.load() user function. ........ r3742 | bugman | 2007-11-21 00:09:32 +0100 (Wed, 21 Nov 2007) | 3 lines Fix for the previously committed unit test. ........ r3743 | bugman | 2007-11-21 00:11:15 +0100 (Wed, 21 Nov 2007) | 3 lines Shifted the prompt.state.State class instance into the unit test class namespace. ........ r3744 | bugman | 2007-11-21 00:13:29 +0100 (Wed, 21 Nov 2007) | 3 lines Placed the generic.state module into the unit test class namespace. ........ r3745 | bugman | 2007-11-21 00:14:05 +0100 (Wed, 21 Nov 2007) | 3 lines Incorrect comment fix. ........ r3746 | bugman | 2007-11-21 00:22:26 +0100 (Wed, 21 Nov 2007) | 3 lines Updated the prompt.state and generic_fns.state unit tests to test the correct functions. ........ r3747 | bugman | 2007-11-21 00:24:12 +0100 (Wed, 21 Nov 2007) | 3 lines Fixed the argument unit tests for the state.load() user function. ........ r3748 | bugman | 2007-11-21 00:27:28 +0100 (Wed, 21 Nov 2007) | 3 lines Fixed the state.load() and state.save() user functions to properly call the generic_fns functions. ........ r3749 | bugman | 2007-11-21 00:36:42 +0100 (Wed, 21 Nov 2007) | 3 lines Converted the arguments into keyword arguments to try to fix these unit tests. ........ r3750 | bugman | 2007-11-21 00:49:24 +0100 (Wed, 21 Nov 2007) | 3 lines Fix for the nasty function argument bug! ........ r3751 | bugman | 2007-11-21 00:51:39 +0100 (Wed, 21 Nov 2007) | 3 lines Implemented the file arg unit test for the state.save() user function. ........ r3752 | bugman | 2007-11-21 00:52:40 +0100 (Wed, 21 Nov 2007) | 5 lines Implemented the dir arg unit test for the state.save() user function. And a fix for the file arg unit test of state.save(). ........ r3753 | bugman | 2007-11-21 00:56:43 +0100 (Wed, 21 Nov 2007) | 3 lines Implemented the force arg unit test for the state.save() user function. ........ r3754 | bugman | 2007-11-21 00:57:08 +0100 (Wed, 21 Nov 2007) | 3 lines Changed the int data types so none would be 0 or 1 (the bin types). ........ r3755 | bugman | 2007-11-21 01:00:41 +0100 (Wed, 21 Nov 2007) | 3 lines Implemented the compress_type arg unit test for the state.save() user function. ........ Added: branches/N_state_model/test_suite/unit_tests/_data/ - copied from r3755, 1.3/test_suite/unit_tests/_data/ branches/N_state_model/test_suite/unit_tests/_generic_fns/ - copied from r3755, 1.3/test_suite/unit_tests/_generic_fns/ branches/N_state_model/test_suite/unit_tests/_maths_fns/ - copied from r3755, 1.3/test_suite/unit_tests/_maths_fns/ branches/N_state_model/test_suite/unit_tests/_prompt/ - copied from r3755, 1.3/test_suite/unit_tests/_prompt/ branches/N_state_model/test_suite/unit_tests/state_testing_base.py - copied unchanged from r3755, 1.3/test_suite/unit_tests/state_testing_base.py Removed: branches/N_state_model/test_suite/unit_tests/data/ branches/N_state_model/test_suite/unit_tests/generic_fns/ branches/N_state_model/test_suite/unit_tests/maths_fns/ branches/N_state_model/test_suite/unit_tests/prompt/ Modified: branches/N_state_model/ (props changed) branches/N_state_model/prompt/state.py Propchange: branches/N_state_model/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Wed Nov 21 12:27:19 2007 @@ -1,1 +1,1 @@ -/1.3:1-3692,3695,3697-3713,3715-3719,3721-3728,3730-3731 +/1.3:1-3692,3695,3697-3713,3715-3719,3721-3728,3730-3731,3733-3755 Modified: branches/N_state_model/prompt/state.py URL: http://svn.gna.org/viewcvs/relax/branches/N_state_model/prompt/state.py?rev=3756&r1=3755&r2=3756&view=diff ============================================================================== --- branches/N_state_model/prompt/state.py (original) +++ branches/N_state_model/prompt/state.py Wed Nov 21 12:27:19 2007 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2003-2005 Edward d'Auvergne # +# Copyright (C) 2003-2005, 2007 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -20,10 +20,13 @@ # # ############################################################################### +# Python module imports. import sys +# relax module imports. import help from relax_errors import RelaxBinError, RelaxIntError, RelaxNoneStrError, RelaxStrError +from generic_fns.state import load_state, save_state class State: @@ -92,7 +95,7 @@ raise RelaxNoneStrError, ('directory', dir) # Execute the functional code. - self.__relax__.generic.state.load(file=file, dir=dir) + load_state(file=file, dir_name=dir) def save(self, file=None, dir=None, force=0, compress_type=1): @@ -172,4 +175,4 @@ raise RelaxIntError, ('compression type', compress_type) # Execute the functional code. - self.__relax__.generic.state.save(file=file, dir=dir, force=force, compress_type=compress_type) + save_state(file=file, dir=dir, force=force, compress_type=compress_type)