mailr3839 - in /branches/N_state_model: ./ test_suite/unit_tests/


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

Header


Content

Posted by edward on November 23, 2007 - 13:42:
Author: bugman
Date: Fri Nov 23 13:42:47 2007
New Revision: 3839

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

........
  r3836 | bugman | 2007-11-22 18:31:25 +0100 (Thu, 22 Nov 2007) | 6 lines
  
  Bug fix for the unit test for reading of the amino acid sequence out of a 
protein NOE data file.
   
  The path has been changed to a relative path so that the unit tests can be 
run by themselves or as
  part of relax.
........
  r3837 | bugman | 2007-11-22 18:33:00 +0100 (Thu, 22 Nov 2007) | 6 lines
  
  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.
........
  r3838 | bugman | 2007-11-22 19:07:07 +0100 (Thu, 22 Nov 2007) | 3 lines
  
  A temporary fix for the RelaxWarning message formatting.
........

Modified:
    branches/N_state_model/   (props changed)
    branches/N_state_model/relax_warnings.py
    branches/N_state_model/test_suite/unit_tests/sequence_testing_base.py
    branches/N_state_model/test_suite/unit_tests/state_testing_base.py

Propchange: branches/N_state_model/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Nov 23 13:42:47 2007
@@ -1,1 +1,1 @@
-/1.3:1-3692,3695,3697-3713,3715-3719,3721-3728,3730-3731,3733-3755,3757-3807,3809-3833
+/1.3:1-3692,3695,3697-3713,3715-3719,3721-3728,3730-3731,3733-3755,3757-3807,3809-3833,3836-3838

Modified: branches/N_state_model/relax_warnings.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/relax_warnings.py?rev=3839&r1=3838&r2=3839&view=diff
==============================================================================
--- branches/N_state_model/relax_warnings.py (original)
+++ branches/N_state_model/relax_warnings.py Fri Nov 23 13:42:47 2007
@@ -37,8 +37,8 @@
     """ Replacement for warnings.formatwarning to customise output format."""
 
     # Add the text 'RelaxWarning: ' to the start of the warning message.
-    if issubclass(category, BaseWarning):
-        message = "RelaxWarning: %s\n\n" % message
+    #if issubclass(category, BaseWarning):
+    message = "RelaxWarning: %s\n\n" % message
 
     # Print stack-trace in debug mode.
     if Debug:

Modified: 
branches/N_state_model/test_suite/unit_tests/sequence_testing_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/test_suite/unit_tests/sequence_testing_base.py?rev=3839&r1=3838&r2=3839&view=diff
==============================================================================
--- branches/N_state_model/test_suite/unit_tests/sequence_testing_base.py 
(original)
+++ branches/N_state_model/test_suite/unit_tests/sequence_testing_base.py Fri 
Nov 23 13:42:47 2007
@@ -22,6 +22,7 @@
 
 # Python module imports.
 from os import remove, tempnam
+import sys
 try:
     from hashlib import md5
 except ImportError:
@@ -70,8 +71,13 @@
         The functions tested are generic_fns.sequence.read() and 
prompt.sequence.read().
         """
 
+        # Get the relative path of relax.
+        path = sys.path[0]
+        if path == '.':
+            path = sys.path[-1]
+
         # Read the residue sequence out of the Ap4Aase 600 MHz NOE data file.
-        self.sequence_fns.read(file='Ap4Aase.Noe.600.bz2', 
dir='../shared_data/relaxation_data')
+        self.sequence_fns.read(file='Ap4Aase.Noe.600.bz2', 
dir=path+'/test_suite/shared_data/relaxation_data')
 
         # Test parts of the sequence.
         self.assertEqual(relax_data_store['orig'].mol[0].res[0].num, 1)

Modified: branches/N_state_model/test_suite/unit_tests/state_testing_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/test_suite/unit_tests/state_testing_base.py?rev=3839&r1=3838&r2=3839&view=diff
==============================================================================
--- branches/N_state_model/test_suite/unit_tests/state_testing_base.py 
(original)
+++ branches/N_state_model/test_suite/unit_tests/state_testing_base.py Fri 
Nov 23 13:42:47 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 Fri Nov 23 14:00:17 2007