mailr3837 - /1.3/test_suite/unit_tests/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 22, 2007 - 18:33:
Author: bugman
Date: Thu Nov 22 18:33:00 2007
New Revision: 3837

URL: http://svn.gna.org/viewcvs/relax?rev=3837&view=rev
Log:
Bug fix for the unit test for the unpickling and restoration of the relax 
data storage singleton.

The path has been changed to a relative path so that the unit tests can be 
run by themselves or as
part of relax.


Modified:
    1.3/test_suite/unit_tests/state_testing_base.py

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=3837&r1=3836&r2=3837&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/state_testing_base.py (original)
+++ 1.3/test_suite/unit_tests/state_testing_base.py Thu Nov 22 18:33:00 2007
@@ -22,6 +22,7 @@
 
 # Python module imports.
 from os import remove, tmpfile
+import sys
 
 # relax module imports.
 from data import Data as relax_data_store
@@ -66,8 +67,13 @@
         self.assertEqual(relax_data_store.current_pipe, None)
         self.assert_(not hasattr(relax_data_store, 'y'))
 
+        # Get the relative path of relax.
+        path = sys.path[0]
+        if path == '.':
+            path = sys.path[-1]
+
         # Load the state.
-        self.state.load_state(state='basic_single_pipe', 
dir_name='../shared_data/saved_states')
+        self.state.load_state(state='basic_single_pipe', 
dir_name=path+'/test_suite/shared_data/saved_states')
 
         # Test the contents of the restored singleton.
         self.assertEqual(relax_data_store.keys(), ['orig'])




Related Messages


Powered by MHonArc, Updated Thu Nov 22 19:20:18 2007