mailr22457 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py


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

Header


Content

Posted by tlinnet on March 12, 2014 - 12:04:
Author: tlinnet
Date: Wed Mar 12 12:04:41 2014
New Revision: 22457

URL: http://svn.gna.org/viewcvs/relax?rev=22457&view=rev
Log:
Extendend unit test test_value_write_calc_rotating_frame_params() to also 
test writing of w_eff values.

Regarding sr #3124, (https://gna.org/support/index.php?3124) - Grace graphs 
production for R1rho analysis with R2_eff as function of Omega_eff.

Modified:
    
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

Modified: 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22457&r1=22456&r2=22457&view=diff
==============================================================================
--- 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py  
      (original)
+++ 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py  
      Wed Mar 12 12:04:41 2014
@@ -780,19 +780,23 @@
         # Set filepaths.
         int_filepath = ds.tmpdir+sep+'int.out'
         theta_filepath = ds.tmpdir+sep+'theta.out'
+        w_eff_filepath = ds.tmpdir+sep+'w_eff.out'
 
         # Write out the intensity and theta parameter file.
         # The writing out of intensity file is to make sure the API function 
retains its function after modification for special parameters.
         value.write(param='intensities', file='int.out', dir=ds.tmpdir, 
scaling=1.0, force=True)
         value.write(param='theta', file='theta.out', dir=ds.tmpdir, 
scaling=1.0, force=True)
+        value.write(param='w_eff', file='w_eff.out', dir=ds.tmpdir, 
scaling=1.0, force=True)
 
         # Test the file exists.
         self.assert_(access(int_filepath, F_OK))
         self.assert_(access(theta_filepath, F_OK))
+        self.assert_(access(w_eff_filepath, F_OK))
 
         # Open the files for testing.
         int_file = open(int_filepath, 'r')
         theta_file = open(theta_filepath, 'r')
+        w_eff_file = open(w_eff_filepath, 'r')
 
         # Loop over the intensity file to test values.
         for line in int_file:
@@ -838,7 +842,32 @@
             elif linesplit[0] == "None" and linesplit[1] == "10" and 
linesplit[2] == "L":
                 self.assert_(linesplit[5] != "None")
 
+        # Loop over the w_eff file to test values.
+        for line in w_eff_file:
+            # Skip lines starting with #.
+            if line[0] == "#":
+                continue
+            # Print lines, not including newline character.
+            print(line[:-1])
+
+            # Split the line
+            linesplit = line.split()
+
+            # Assume values
+            if linesplit[0] == "None" and linesplit[1] == "5" and 
linesplit[2] == "I":
+                self.assert_(linesplit[5] != "None")
+            elif linesplit[0] == "None" and linesplit[1] == "6" and 
linesplit[2] == "S":
+                self.assert_(linesplit[5] != "None")
+            elif linesplit[0] == "None" and linesplit[1] == "8" and 
linesplit[2] == "S":
+                self.assert_(linesplit[5] != "None")
+            elif linesplit[0] == "None" and linesplit[1] == "9" and 
linesplit[2] == "A":
+                self.assert_(linesplit[5] != "None")
+            elif linesplit[0] == "None" and linesplit[1] == "10" and 
linesplit[2] == "L":
+                self.assert_(linesplit[5] != "None")
+
         # Close files
         int_file.close()
         theta_file.close()
-
+        w_eff_file.close()
+
+




Related Messages


Powered by MHonArc, Updated Wed Mar 12 12:20:02 2014