Author: bugman Date: Tue Nov 20 17:41:59 2007 New Revision: 3698 URL: http://svn.gna.org/viewcvs/relax?rev=3698&view=rev Log: Added the framework for implementing unit tests for the generic_fns.state module. Added: 1.3/test_suite/unit_tests/generic_fns/test_state.py Added: 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=3698&view=auto ============================================================================== --- 1.3/test_suite/unit_tests/generic_fns/test_state.py (added) +++ 1.3/test_suite/unit_tests/generic_fns/test_state.py Tue Nov 20 17:41:59 2007 @@ -1,0 +1,53 @@ +############################################################################### +# # +# Copyright (C) 2007 Edward d'Auvergne # +# # +# This file is part of the program relax. # +# # +# relax is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# relax is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with relax; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +############################################################################### + +# Python module imports. +from unittest import TestCase + +# relax module imports. +from data import Data as relax_data_store + + + +class Test_state(TestCase): + """Unit tests for the functions of the 'generic_fns.state' module.""" + + def setUp(self): + """Set up for all the data pipe unit tests.""" + + # Reset the relax data storage object. + relax_data_store.__reset__() + + # Add a data pipe to the data store. + relax_data_store.add(pipe_name='orig', pipe_type='mf') + + # Add a single object to the 'orig' data pipe. + relax_data_store['orig'].x = 1 + + + def tearDown(self): + """Reset the relax data storage object.""" + + relax_data_store.__reset__() + + +