mailr27189 - /trunk/test_suite/gui_tests/general.py


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

Header


Content

Posted by edward on January 15, 2015 - 09:54:
Author: bugman
Date: Thu Jan 15 09:54:55 2015
New Revision: 27189

URL: http://svn.gna.org/viewcvs/relax?rev=27189&view=rev
Log:
Racing fixes for the General.test_bug_23187_residue_delete_gui GUI test.

Some GUI interpreter flush() calls have been added to avoid racing in the 
GUI.  The GUI tests are so
quick that the asynchronous user function call will be processed at the same 
time as the spin viewer
window is being created, causing fatal segmentation faults in the test suite.


Modified:
    trunk/test_suite/gui_tests/general.py

Modified: trunk/test_suite/gui_tests/general.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/general.py?rev=27189&r1=27188&r2=27189&view=diff
==============================================================================
--- trunk/test_suite/gui_tests/general.py       (original)
+++ trunk/test_suite/gui_tests/general.py       Thu Jan 15 09:54:55 2015
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2014 Edward d'Auvergne                                       
 #
+# Copyright (C) 2014-2015 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax (http://www.nmr-relax.com).         
 #
 #                                                                            
 #
@@ -31,6 +31,7 @@
 from test_suite.gui_tests.base_classes import GuiTestCase
 
 # relax GUI imports.
+from gui.interpreter import Interpreter; interpreter = Interpreter()
 from gui.string_conv import str_to_gui
 
 
@@ -78,8 +79,10 @@
         # Mf tab:  Simulate the new analysis wizard.
         analysis = self.new_analysis_wizard(analysis_type='mf', 
analysis_name='Mf test', pipe_name='mf', pipe_bundle='mf bundle')
 
+        # Create some residues.
         self._execute_uf(uf_name='residue.create', res_num=1)
         self._execute_uf(uf_name='residue.create', res_num=2)
+        interpreter.flush()    # Required because of the asynchronous uf 
call.
 
         # Launch the spin viewer window.
         self.app.gui.show_tree()
@@ -87,8 +90,9 @@
         # Close the spin viewer window.
         self.app.gui.spin_viewer.handler_close()
 
-        # Delete spin,
+        # Delete residue 2.
         self._execute_uf(uf_name='residue.delete', res_id=":2")
+        interpreter.flush()    # Required because of the asynchronous uf 
call.
 
         # Launch the spin viewer window.
         self.app.gui.show_tree()




Related Messages


Powered by MHonArc, Updated Thu Jan 15 10:20:01 2015