mailr3729 - in /branches/N_state_model: ./ generic_fns/ test_suite/unit_tests/ test_suite/unit_tests/generic_fns/


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

Header


Content

Posted by edward on November 20, 2007 - 19:44:
Author: bugman
Date: Tue Nov 20 19:44:06 2007
New Revision: 3729

URL: http://svn.gna.org/viewcvs/relax?rev=3729&view=rev
Log:
Merged revisions 3721-3728 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3

........
  r3721 | bugman | 2007-11-20 19:23:32 +0100 (Tue, 20 Nov 2007) | 3 lines
  
  Added a framework for the unit tests of the relax_io module.
........
  r3722 | bugman | 2007-11-20 19:28:44 +0100 (Tue, 20 Nov 2007) | 3 lines
  
  Added a unit test to check that some file paths are unmodified by 
relax_io.get_file_path().
........
  r3723 | bugman | 2007-11-20 19:32:19 +0100 (Tue, 20 Nov 2007) | 3 lines
  
  Unit test for the modification of file paths by relax_io.get_file_path when 
a directory is supplied.
........
  r3724 | bugman | 2007-11-20 19:32:55 +0100 (Tue, 20 Nov 2007) | 3 lines
  
  Improved the docstring of the unit test for relax_io.get_file_path().
........
  r3725 | bugman | 2007-11-20 19:35:34 +0100 (Tue, 20 Nov 2007) | 3 lines
  
  Added a unit test for relax_io.get_file_path when '~' is present in the 
path.
........
  r3726 | bugman | 2007-11-20 19:39:07 +0100 (Tue, 20 Nov 2007) | 3 lines
  
  Renamed the load() and save() functions of generic_fns.state to 
load_state() and save_state().
........
  r3727 | bugman | 2007-11-20 19:41:01 +0100 (Tue, 20 Nov 2007) | 5 lines
  
  Fixed the tearDown() method of the generic_fns.state unit tests.
  
  The method no longer fails if the file 'test.bz2' does not exist.
........
  r3728 | bugman | 2007-11-20 19:42:44 +0100 (Tue, 20 Nov 2007) | 3 lines
  
  Fixed the unit tests of generic_fns.state to use the newly renamed methods 
of that module.
........

Added:
    branches/N_state_model/test_suite/unit_tests/test_relax_io.py
      - copied unchanged from r3728, 
1.3/test_suite/unit_tests/test_relax_io.py
Modified:
    branches/N_state_model/   (props changed)
    branches/N_state_model/generic_fns/state.py
    branches/N_state_model/test_suite/unit_tests/generic_fns/test_state.py

Propchange: branches/N_state_model/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Nov 20 19:44:06 2007
@@ -1,1 +1,1 @@
-/1.3:1-3692,3695,3697-3713,3715-3719
+/1.3:1-3692,3695,3697-3713,3715-3719,3721-3728

Modified: branches/N_state_model/generic_fns/state.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/generic_fns/state.py?rev=3729&r1=3728&r2=3729&view=diff
==============================================================================
--- branches/N_state_model/generic_fns/state.py (original)
+++ branches/N_state_model/generic_fns/state.py Tue Nov 20 19:44:06 2007
@@ -28,7 +28,7 @@
 from relax_io import open_read_file, open_write_file
 
 
-def load(file=None, dir=None, compress_type=1):
+def load_state(file=None, dir=None, compress_type=1):
     """Function for loading a saved program state."""
 
     # Open the file for reading.
@@ -41,7 +41,7 @@
     file.close()
 
 
-def save(file=None, dir=None, force=0, compress_type=1):
+def save_state(file=None, dir=None, force=0, compress_type=1):
     """Function for saving the program state."""
 
     # Open the file for writing.

Modified: 
branches/N_state_model/test_suite/unit_tests/generic_fns/test_state.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/test_suite/unit_tests/generic_fns/test_state.py?rev=3729&r1=3728&r2=3729&view=diff
==============================================================================
--- branches/N_state_model/test_suite/unit_tests/generic_fns/test_state.py 
(original)
+++ branches/N_state_model/test_suite/unit_tests/generic_fns/test_state.py 
Tue Nov 20 19:44:06 2007
@@ -26,7 +26,7 @@
 
 # relax module imports.
 from data import Data as relax_data_store
-from generic_fns import state
+from generic_fns.state import load_state, save_state
 
 
 
@@ -53,7 +53,10 @@
         relax_data_store.__reset__()
 
         # Clean up the temporarily created dump files.
-        remove('test.bz2')
+        try:
+            remove('test.bz2')
+        except OSError:
+            pass
 
 
     def test_load(self):
@@ -63,7 +66,7 @@
         """
 
         # Save the state.
-        state.save('test')
+        save_state('test')
 
         # Reset the relax data store.
         relax_data_store.__reset__()
@@ -73,7 +76,7 @@
         self.assertEqual(relax_data_store.current_pipe, None)
 
         # Load the state.
-        state.load('test')
+        load_state('test')
 
         # Test the contents of the restored singleton.
         self.assertEqual(relax_data_store.keys(), ['orig'])
@@ -88,4 +91,4 @@
         """
 
         # Save the state.
-        state.save('test')
+        save_state('test')




Related Messages


Powered by MHonArc, Updated Tue Nov 20 23:20:14 2007