mailr13219 - /branches/gui_testing/test_suite/gui_tests/noe.py


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

Header


Content

Posted by edward on June 24, 2011 - 13:56:
Author: bugman
Date: Fri Jun 24 13:56:39 2011
New Revision: 13219

URL: http://svn.gna.org/viewcvs/relax?rev=13219&view=rev
Log:
The NOE analysis GUI system test now launches and kills the main GUI window.


Modified:
    branches/gui_testing/test_suite/gui_tests/noe.py

Modified: branches/gui_testing/test_suite/gui_tests/noe.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/test_suite/gui_tests/noe.py?rev=13219&r1=13218&r2=13219&view=diff
==============================================================================
--- branches/gui_testing/test_suite/gui_tests/noe.py (original)
+++ branches/gui_testing/test_suite/gui_tests/noe.py Fri Jun 24 13:56:39 2011
@@ -22,9 +22,15 @@
 
 # Python module imports.
 from unittest import TestCase
+import wx
+
+# Dependency checks.
+import dep_check
 
 # relax module imports.
 from data import Relax_data_store; ds = Relax_data_store()
+if dep_check.wx_module:
+    from gui.relax_gui import Main
 from status import Status; status = Status()
 
 
@@ -34,11 +40,28 @@
     def setUp(self):
         """Set up for all the functional tests."""
 
+        # Start the GUI.
+        self.app = wx.App()
+
+        # Build the GUI.
+        main = Main(parent=None, id=-1, title="")
+
+        # Make it the main application component.
+        self.app.SetTopWindow(main)
+
+        # Show it.
+        main.Show()
+
 
     def tearDown(self):
         """Reset the relax data storage object."""
 
+        # Reset the relax data storage object.
         ds.__reset__()
+
+        # Kill the app.
+        wx.CallAfter(self.app.Exit)
+        self.app.MainLoop()
 
 
     def test_noe_analysis(self):




Related Messages


Powered by MHonArc, Updated Fri Jun 24 15:00:02 2011