Author: bugman
Date: Mon Feb  2 23:34:27 2015
New Revision: 27444

URL: http://svn.gna.org/viewcvs/relax?rev=27444&view=rev
Log:
Big bug fix for the GUI tests on MS Windows systems.

On MS Windows systems, the GUI tests were unable to complete without crashing.  
This is because each
GUI element requires one 'User object', and MS Windows has a maximum limit of 
10,000 of these
objects.  The GUI tests were taking more than 10,000 and then Windows would say 
- relax, you die
now.

The solution is that after each GUI test, all user function windows are 
destroyed.  The user
function page is a wx.Panel object, so this requires a Destroy() call.  But the 
window is a Uf_page
instance which inherits from Wiz_page which inherits from wx.Dialog.  Calling 
Destroy() on MS
Windows and Linux works fine, but is fatal on Mac OS X systems.  So the 
solution is to call Close()
instead.


Modified:
    trunk/test_suite/gui_tests/base_classes.py

Modified: trunk/test_suite/gui_tests/base_classes.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/base_classes.py?rev=27444&r1=27443&r2=27444&view=diff
==============================================================================
--- trunk/test_suite/gui_tests/base_classes.py  (original)
+++ trunk/test_suite/gui_tests/base_classes.py  Mon Feb  2 23:34:27 2015
@@ -255,5 +255,14 @@
         # Reset relax.
         reset()
 
+        # Destroy all user function windows to save memory (specifically to 
avoid the 10,000 USER Object limit in MS Windows).
+        for name in uf_store:
+            if hasattr(uf_store[name], 'page') and uf_store[name].page != None:
+                uf_store[name].page.Destroy()
+                del uf_store[name].page
+            if uf_store[name].wizard != None:
+                uf_store[name].wizard.Close()
+                uf_store[name].wizard = None
+
         # Flush all wx events again to allow the reset event to propagate 
throughout the GUI and the execution lock to be released before the next test 
starts.
         wx.Yield()


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to