mailr11002 - in /1.3/test_suite: shared_data/align_data/CaM/ unit_tests/


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

Header


Content

Posted by edward on March 15, 2010 - 15:01:
Author: bugman
Date: Mon Mar 15 15:01:28 2010
New Revision: 11002

URL: http://svn.gna.org/viewcvs/relax?rev=11002&view=rev
Log:
More fixes for the install path change to __main__.install_path.


Modified:
    1.3/test_suite/shared_data/align_data/CaM/generate_data.py
    1.3/test_suite/shared_data/align_data/CaM/pre_bleach.py
    1.3/test_suite/unit_tests/relax_data_testing_base.py
    1.3/test_suite/unit_tests/sequence_testing_base.py

Modified: 1.3/test_suite/shared_data/align_data/CaM/generate_data.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/shared_data/align_data/CaM/generate_data.py?rev=11002&r1=11001&r2=11002&view=diff
==============================================================================
--- 1.3/test_suite/shared_data/align_data/CaM/generate_data.py (original)
+++ 1.3/test_suite/shared_data/align_data/CaM/generate_data.py Mon Mar 15 
15:01:28 2010
@@ -1,6 +1,7 @@
 # relax script for generating synthetic RDC and PCS data for the 
bax_C_1J7P_N_H_Ca.pdb structure.
 
 # Python module imports.
+import __main__
 from numpy import dot, float64, sum, transpose, zeros
 from numpy.linalg import eigvals, norm
 from os import sep
@@ -55,7 +56,7 @@
 chi_tensor = tensor / pcs_const
 
 # Path to files.
-path = sys.path[-1] + sep+'test_suite'+sep+'shared_data'+sep
+path = __main__.install_path + sep+'test_suite'+sep+'shared_data'+sep
 
 # Create a data pipe.
 pipe.create('synth', 'N-state')

Modified: 1.3/test_suite/shared_data/align_data/CaM/pre_bleach.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/shared_data/align_data/CaM/pre_bleach.py?rev=11002&r1=11001&r2=11002&view=diff
==============================================================================
--- 1.3/test_suite/shared_data/align_data/CaM/pre_bleach.py (original)
+++ 1.3/test_suite/shared_data/align_data/CaM/pre_bleach.py Mon Mar 15 
15:01:28 2010
@@ -1,6 +1,7 @@
 # relax script for generating synthetic RDC and PCS data for the 
bax_C_1J7P_N_H_Ca.pdb structure.
 
 # Python module imports.
+import __main__
 from numpy import dot, float64, sum, transpose, zeros
 from numpy.linalg import eigvals, norm
 from os import sep
@@ -15,7 +16,7 @@
 
 
 # Path to files.
-path = sys.path[-1] + sep+'test_suite'+sep+'shared_data'+sep
+path = __main__.install_path + sep+'test_suite'+sep+'shared_data'+sep
 
 # Create a data pipe.
 pipe.create('pre', 'N-state')

Modified: 1.3/test_suite/unit_tests/relax_data_testing_base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/relax_data_testing_base.py?rev=11002&r1=11001&r2=11002&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/relax_data_testing_base.py (original)
+++ 1.3/test_suite/unit_tests/relax_data_testing_base.py Mon Mar 15 15:01:28 
2010
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2007-2009 Edward d'Auvergne                                  
 #
+# Copyright (C) 2007-2010 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -21,6 +21,7 @@
 
###############################################################################
 
 # Python module imports.
+import __main__
 from os import sep
 import sys
 
@@ -69,16 +70,11 @@
         The functions tested are both specific_fns.relax_data.read() and 
prompt.relax_data.read().
         """
 
-        # Get the relative path of relax.
-        path = sys.path[0]
-        if path == '.':
-            path = sys.path[-1]
-
         # First read the residue sequence out of the Ap4Aase 600 MHz NOE 
data file.
-        sequence.read(file='Ap4Aase.Noe.600.bz2', 
dir=path+sep+'test_suite'+sep+'shared_data'+sep+'relaxation_data', 
res_num_col=1, res_name_col=2)
+        sequence.read(file='Ap4Aase.Noe.600.bz2', 
dir=__main__.install_path+sep+'test_suite'+sep+'shared_data'+sep+'relaxation_data',
 res_num_col=1, res_name_col=2)
 
         # Then read the data out of the same file.
-        self.relax_data_fns.read(ri_label='NOE', frq_label='600', frq=600e6, 
file='Ap4Aase.Noe.600.bz2', 
dir=path+sep+'test_suite'+sep+'shared_data'+sep+'relaxation_data', 
res_num_col=1, res_name_col=2, data_col=3, error_col=4)
+        self.relax_data_fns.read(ri_label='NOE', frq_label='600', frq=600e6, 
file='Ap4Aase.Noe.600.bz2', 
dir=__main__.install_path+sep+'test_suite'+sep+'shared_data'+sep+'relaxation_data',
 res_num_col=1, res_name_col=2, data_col=3, error_col=4)
 
         # Test the pipe data structures.
         self.assertEqual(cdp.frq, [600e6])

Modified: 1.3/test_suite/unit_tests/sequence_testing_base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/sequence_testing_base.py?rev=11002&r1=11001&r2=11002&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/sequence_testing_base.py (original)
+++ 1.3/test_suite/unit_tests/sequence_testing_base.py Mon Mar 15 15:01:28 
2010
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2007, 2009 Edward d'Auvergne                                 
 #
+# Copyright (C) 2007-2010 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -21,6 +21,7 @@
 
###############################################################################
 
 # Python module imports.
+import __main__
 from os import sep
 import sys
 from tempfile import mktemp
@@ -139,13 +140,8 @@
         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=path+sep+'test_suite'+sep+'shared_data'+sep+'relaxation_data', 
res_num_col=1, res_name_col=2)
+        self.sequence_fns.read(file='Ap4Aase.Noe.600.bz2', 
dir=__main__.install_path+sep+'test_suite'+sep+'shared_data'+sep+'relaxation_data',
 res_num_col=1, res_name_col=2)
 
         # Get the data pipe.
         dp = pipes.get_pipe('orig')




Related Messages


Powered by MHonArc, Updated Tue Mar 16 00:40:03 2010