mailr22165 - in /trunk/test_suite: gui_tests/ shared_data/model_free/bug_21615_incomplete_setup_failure/


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

Header


Content

Posted by edward on February 10, 2014 - 10:37:
Author: bugman
Date: Mon Feb 10 10:37:53 2014
New Revision: 22165

URL: http://svn.gna.org/viewcvs/relax?rev=22165&view=rev
Log:
Created the Mf.test_bug_21615_incomplete_setup_failure GUI tests.

This is designed to catch bug #21615 (https://gna.org/bugs/?21615) as 
reported by Ivan Leung
(ivanhoe dott leung att chem dott ox dot ac dot uk).

Included are the data files Ivan attached to the bug report truncated to two 
residues.  The GUI test
follows exactly the steps outlined by Ivan.


Added:
    
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/
    
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/NOE_ForBugReport.txt
   (with props)
    
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/T1_ForBugReport.txt
   (with props)
    
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/T2_ForBugReport.txt
   (with props)
    
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/Truncated_ForBugReport.pdb
Modified:
    trunk/test_suite/gui_tests/model_free.py

Modified: trunk/test_suite/gui_tests/model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/model_free.py?rev=22165&r1=22164&r2=22165&view=diff
==============================================================================
--- trunk/test_suite/gui_tests/model_free.py (original)
+++ trunk/test_suite/gui_tests/model_free.py Mon Feb 10 10:37:53 2014
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2006-2013 Edward d'Auvergne                                  
 #
+# Copyright (C) 2006-2014 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax (http://www.nmr-relax.com).         
 #
 #                                                                            
 #
@@ -185,6 +185,91 @@
 
             # Exceptions in the thread.
             self.check_exceptions()
+
+
+    def test_bug_21615_incomplete_setup_failure(self):
+        """Catch U{bug #21615<https://gna.org/bugs/?21615>}, the failure of 
showing the missing data dialog when executing the analysis with an 
incomplete setup.
+
+        This was reported by Ivan Leung.
+        """
+
+        # Simulate the new analysis wizard.
+        self.app.gui.analysis.menu_new(None)
+        page = self.app.gui.analysis.new_wizard.wizard.get_page(0)
+        page.select_mf(None)
+        page.analysis_name.SetValue(str_to_gui("Model-free incomplete setup 
failure"))
+        self.app.gui.analysis.new_wizard.wizard._go_next(None)
+        page = self.app.gui.analysis.new_wizard.wizard.get_page(1)
+        self.app.gui.analysis.new_wizard.wizard._go_next(None)
+
+        # Get the data.
+        analysis_type, analysis_name, pipe_name, pipe_bundle, uf_exec = 
self.app.gui.analysis.new_wizard.get_data()
+
+        # Set up the analysis.
+        self.app.gui.analysis.new_analysis(analysis_type=analysis_type, 
analysis_name=analysis_name, pipe_name=pipe_name, pipe_bundle=pipe_bundle)
+
+        # Alias the analysis.
+        analysis = self.app.gui.analysis.get_page_from_name("Model-free 
incomplete setup failure")
+
+        # Change the results directory.
+        analysis.field_results_dir.SetValue(str_to_gui(ds.tmpdir))
+
+        # The data path.
+        data_path = status.install_path + sep + 'test_suite' + sep + 
'shared_data' + sep + 'model_free' + sep + 
'bug_21615_incomplete_setup_failure' + sep
+
+        # Launch the spin viewer window.
+        self.app.gui.show_tree()
+
+        # Spin loading wizard:  Initialisation.
+        self.app.gui.spin_viewer.load_spins_wizard()
+
+        # Spin loading wizard:  The PDB file.
+        page = self.app.gui.spin_viewer.wizard.get_page(0)
+        page.selection = 'new pdb'
+        self.app.gui.spin_viewer.wizard._go_next()
+        page = 
self.app.gui.spin_viewer.wizard.get_page(self.app.gui.spin_viewer.wizard._current_page)
+        page.uf_args['file'].SetValue(str_to_gui(data_path + 
'Truncated_ForBugReport.pdb'))
+        self.app.gui.spin_viewer.wizard._go_next()
+        interpreter.flush()    # Required because of the asynchronous uf 
call.
+
+        # Spin loading wizard:  The spin loading.
+        page = 
self.app.gui.spin_viewer.wizard.get_page(self.app.gui.spin_viewer.wizard._current_page)
+        page.uf_args['spin_id'].SetValue(str_to_gui('@N'))
+        self.app.gui.spin_viewer.wizard._apply()
+        page.uf_args['spin_id'].SetValue(str_to_gui('@H'))
+        self.app.gui.spin_viewer.wizard._go_next()
+        interpreter.flush()    # Required because of the asynchronous uf 
call.
+
+        # Close the spin viewer window.
+        self.app.gui.spin_viewer.handler_close()
+
+        # Flush the interpreter in preparation for the synchronous user 
functions of the peak list wizard.
+        interpreter.flush()
+
+        # Set the element type.
+        self._execute_uf(uf_name='spin.element', element='N')
+
+        # Load the relaxation data.
+        data = [
+            ['NOE_ForBugReport.txt', 'noe_800', 'NOE', 800000001.0],
+            ['T1_ForBugReport.txt',  'r1_800',  'R1',  800000001.0],
+            ['T2_ForBugReport.txt',  'r2_800',  'R2',  800000001.0]
+        ]
+        for i in range(len(data)):
+            self._execute_uf(uf_name='relax_data.read', 
file=data_path+data[i][0], ri_id=data[i][1], ri_type=data[i][2], 
frq=data[i][3], mol_name_col=1, res_num_col=2, res_name_col=3, 
spin_num_col=4, spin_name_col=5, data_col=6, error_col=7)
+
+        # Execute relax.
+        state = 
analysis.execute(wx.CommandEvent(wx.wxEVT_COMMAND_BUTTON_CLICKED, 
analysis.button_exec_relax.GetId()))
+
+        # Wait for execution to complete.
+        if hasattr(analysis, 'thread'):
+            analysis.thread.join()
+
+        # Flush all wx events.
+        wx.Yield()
+
+        # Exceptions in the thread.
+        self.check_exceptions()
 
 
     def test_mf_auto_analysis(self):

Added: 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/NOE_ForBugReport.txt
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/NOE_ForBugReport.txt?rev=22165&view=auto
==============================================================================
--- 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/NOE_ForBugReport.txt
 (added)
+++ 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/NOE_ForBugReport.txt
 Mon Feb 10 10:37:53 2014
@@ -1,0 +1,2 @@
+2 ALA -1.1755 N
+3 ASP -1.19652855543113 N

Propchange: 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/NOE_ForBugReport.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/T1_ForBugReport.txt
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/T1_ForBugReport.txt?rev=22165&view=auto
==============================================================================
--- 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/T1_ForBugReport.txt
 (added)
+++ 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/T1_ForBugReport.txt
 Mon Feb 10 10:37:53 2014
@@ -1,0 +1,2 @@
+2 ALA 0.680137931972604 N
+3 ASP 1.007912110064 N

Propchange: 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/T1_ForBugReport.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/T2_ForBugReport.txt
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/T2_ForBugReport.txt?rev=22165&view=auto
==============================================================================
--- 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/T2_ForBugReport.txt
 (added)
+++ 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/T2_ForBugReport.txt
 Mon Feb 10 10:37:53 2014
@@ -1,0 +1,2 @@
+2 ALA 5.49631746729691 N
+3 ASP 3.74279511939516 N

Propchange: 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/T2_ForBugReport.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/Truncated_ForBugReport.pdb
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/Truncated_ForBugReport.pdb?rev=22165&view=auto
==============================================================================
--- 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/Truncated_ForBugReport.pdb
 (added)
+++ 
trunk/test_suite/shared_data/model_free/bug_21615_incomplete_setup_failure/Truncated_ForBugReport.pdb
 Mon Feb 10 10:37:53 2014
@@ -1,0 +1,42 @@
+ATOM      1  N   MET A   1       0.277  13.076 -21.464  1.00  0.00           
N  
+ATOM      2  CA  MET A   1      -0.629  13.254 -20.298  1.00  0.00           
C  
+ATOM      3  C   MET A   1       0.067  12.872 -18.996  1.00  0.00           
C  
+ATOM      4  O   MET A   1       1.185  12.357 -19.006  1.00  0.00           
O  
+ATOM      5  CB  MET A   1      -1.870  12.386 -20.509  1.00  0.00           
C  
+ATOM      6  CG  MET A   1      -2.496  12.542 -21.886  1.00  0.00           
C  
+ATOM      7  SD  MET A   1      -2.004  11.232 -23.024  1.00  0.00           
S  
+ATOM      8  CE  MET A   1      -2.995   9.868 -22.417  1.00  0.00           
C  
+ATOM      9  HA  MET A   1      -0.924  14.291 -20.248  1.00  0.00           
H  
+ATOM     10  HB2 MET A   1      -1.598  11.350 -20.376  1.00  0.00           
H  
+ATOM     11  HB3 MET A   1      -2.611  12.651 -19.769  1.00  0.00           
H  
+ATOM     12  HG2 MET A   1      -3.570  12.524 -21.783  1.00  0.00           
H  
+ATOM     13  HG3 MET A   1      -2.190  13.492 -22.299  1.00  0.00           
H  
+ATOM     14  HE1 MET A   1      -4.030  10.031 -22.679  1.00  0.00           
H  
+ATOM     15  HE2 MET A   1      -2.901   9.804 -21.344  1.00  0.00           
H  
+ATOM     16  HE3 MET A   1      -2.652   8.947 -22.864  1.00  0.00           
H  
+ATOM     17  H1  MET A   1       0.326  12.059 -21.673  1.00  0.00           
H  
+ATOM     18  H2  MET A   1       1.210  13.451 -21.199  1.00  0.00           
H  
+ATOM     19  H3  MET A   1      -0.128  13.603 -22.263  1.00  0.00           
H  
+ATOM     20  N   ALA A   2      -0.603  13.126 -17.877  1.00  0.00           
N  
+ATOM     21  CA  ALA A   2      -0.050  12.807 -16.566  1.00  0.00           
C  
+ATOM     22  C   ALA A   2      -0.207  11.324 -16.249  1.00  0.00           
C  
+ATOM     23  O   ALA A   2      -1.110  10.662 -16.759  1.00  0.00           
O  
+ATOM     24  CB  ALA A   2      -0.719  13.652 -15.493  1.00  0.00           
C  
+ATOM     25  H   ALA A   2      -1.491  13.537 -17.934  1.00  0.00           
H  
+ATOM     26  HA  ALA A   2       1.002  13.054 -16.580  1.00  0.00           
H  
+ATOM     27  HB1 ALA A   2      -1.787  13.660 -15.653  1.00  0.00           
H  
+ATOM     28  HB2 ALA A   2      -0.341  14.663 -15.542  1.00  0.00           
H  
+ATOM     29  HB3 ALA A   2      -0.503  13.235 -14.520  1.00  0.00           
H  
+ATOM     30  N   ASP A   3       0.679  10.809 -15.402  1.00  0.00           
N  
+ATOM     31  CA  ASP A   3       0.638   9.403 -15.016  1.00  0.00           
C  
+ATOM     32  C   ASP A   3      -0.027   9.220 -13.651  1.00  0.00           
C  
+ATOM     33  O   ASP A   3      -0.014   8.123 -13.090  1.00  0.00           
O  
+ATOM     34  CB  ASP A   3       2.053   8.821 -14.986  1.00  0.00           
C  
+ATOM     35  CG  ASP A   3       2.467   8.239 -16.324  1.00  0.00           
C  
+ATOM     36  OD1 ASP A   3       2.066   8.800 -17.364  1.00  0.00           
O  
+ATOM     37  OD2 ASP A   3       3.191   7.222 -16.329  1.00  0.00           
O1-
+ATOM     38  H   ASP A   3       1.375  11.387 -15.028  1.00  0.00           
H  
+ATOM     39  HA  ASP A   3       0.059   8.873 -15.757  1.00  0.00           
H  
+ATOM     40  HB2 ASP A   3       2.751   9.603 -14.724  1.00  0.00           
H  
+ATOM     41  HB3 ASP A   3       2.098   8.039 -14.242  1.00  0.00           
H  
+END




Related Messages


Powered by MHonArc, Updated Mon Feb 10 11:00:02 2014