mailr22086 - in /branches/double_rotor: ./ test_suite/system_tests/ test_suite/system_tests/scripts/noe/


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

Header


Content

Posted by edward on January 31, 2014 - 10:37:
Author: bugman
Date: Fri Jan 31 10:37:40 2014
New Revision: 22086

URL: http://svn.gna.org/viewcvs/relax?rev=22086&view=rev
Log:
Merged revisions 22083 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r22083 | bugman | 2014-01-31 10:36:17 +0100 (Fri, 31 Jan 2014) | 10 lines
  
  Created the Noe.test_bug_21562_noe_replicate_fail system test.
  
  This is to catch bug #21562 (https://gna.org/bugs/?21562), reported by 
Dhanas Muthu
  (https://gna.org/users/dhanas).  This is the failure of the NOE analysis 
when spectra are
  replicated.
  
  This uses the truncated data taken from the files attached to the bug 
report.  The NOE output file
  is checked to see if the contents are correct.
........

Added:
    
branches/double_rotor/test_suite/system_tests/scripts/noe/bug_21562_noe_replicate_fail.py
      - copied unchanged from r22083, 
trunk/test_suite/system_tests/scripts/noe/bug_21562_noe_replicate_fail.py
Modified:
    branches/double_rotor/   (props changed)
    branches/double_rotor/test_suite/system_tests/noe.py

Propchange: branches/double_rotor/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jan 31 10:37:40 2014
@@ -1,1 +1,1 @@
-/trunk:1-22080,22082
+/trunk:1-22080,22082-22083

Modified: branches/double_rotor/test_suite/system_tests/noe.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/double_rotor/test_suite/system_tests/noe.py?rev=22086&r1=22085&r2=22086&view=diff
==============================================================================
--- branches/double_rotor/test_suite/system_tests/noe.py (original)
+++ branches/double_rotor/test_suite/system_tests/noe.py Fri Jan 31 10:37:40 
2014
@@ -41,6 +41,41 @@
 
         # Create a temporary file.
         ds.tmpfile = mktemp()
+
+
+    def test_bug_21562_noe_replicate_fail(self):
+        """Catch U{bug #21562<https://gna.org/bugs/?21562>}, the failure of 
the NOE analysis when replicated spectra are used."""
+
+        # Execute the script.
+        self.script_exec(status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'noe'+sep+'bug_21562_noe_replicate_fail.py')
+
+        # Open the NOE output file.
+        file = open(ds.tmpfile)
+        lines = file.readlines()
+        file.close()
+
+        # How the file should look like.
+        data = [
+            "# Parameter description:  The NOE.\n",
+            "#\n",
+            "# mol_name       res_num    res_name    spin_num    spin_name   
 value                   error                   \n",
+            "2AT7_fmf_mol1    12         PHE         150         N           
    0.803029108487728      0.0199040298831904    \n",
+            "2AT7_fmf_mol1    13         ASN         170         N           
    0.829415981681132      0.0339996453012768    \n",
+            "2AT7_fmf_mol1    14         LYS         184         N           
    0.755789564728523      0.0250941717735858    \n"
+        ]
+
+        # Printout of the real and generated data.
+        print("\n\nThe real data:")
+        for i in range(len(lines)):
+            print(repr(data[i]))
+        print("\nThe generated data:")
+        for i in range(len(lines)):
+            print(repr(lines[i]))
+        print("\n")
+
+        # Check each line.
+        for i in range(len(lines)):
+            self.assertEqual(data[i], lines[i])
 
 
     def test_noe_analysis(self):




Related Messages


Powered by MHonArc, Updated Fri Jan 31 10:40:02 2014