mailr13968 - /branches/gui_testing/relax.py


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

Header


Content

Posted by edward on July 28, 2011 - 18:55:
Author: bugman
Date: Thu Jul 28 18:55:29 2011
New Revision: 13968

URL: http://svn.gna.org/viewcvs/relax?rev=13968&view=rev
Log:
Fix for a lot of code lost in the changes of r13954.

This was because of the renaming of relax to relax.py.


Modified:
    branches/gui_testing/relax.py

Modified: branches/gui_testing/relax.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/relax.py?rev=13968&r1=13967&r2=13968&view=diff
==============================================================================
--- branches/gui_testing/relax.py (original)
+++ branches/gui_testing/relax.py Thu Jul 28 18:55:29 2011
@@ -155,6 +155,9 @@
                 sys.stderr.write("Please install the wx Python module to 
access the relax GUI.\n\n")
                 sys.exit()
 
+            # Set the GUI flag in the status object.
+            status.show_gui = True
+
             # Start the relax GUI wx application.
             app = gui.App(script=self.script_file)
             app.MainLoop()
@@ -184,6 +187,12 @@
             # Run the tests.
             runner = Test_suite_runner(self.tests)
             runner.run_unit_tests()
+
+        # Execute the relax GUI tests.
+        elif mode == 'GUI tests':
+            # Run the tests.
+            runner = Test_suite_runner(self.tests)
+            runner.run_gui_tests()
 
         # Test mode.
         elif mode == 'test':
@@ -215,6 +224,7 @@
         parser.add_option('-x', '--test-suite', action='store_true', 
dest='test_suite', default=0, help='execute the relax test suite')
         parser.add_option('-s', '--system-tests', action='store_true', 
dest='system_tests', default=0, help='execute the relax system/functional 
tests (part of the test suite)')
         parser.add_option('-u', '--unit-tests', action='store_true', 
dest='unit_tests', default=0, help='execute the relax unit tests (part of the 
test suite)')
+        parser.add_option('--gui-tests', action='store_true', 
dest='gui_tests', default=0, help='execute the relax GUI tests (part of the 
test suite)')
         parser.add_option('-i', '--info', action='store_true', dest='info', 
default=0, help='display information about this version of relax')
         parser.add_option('-v', '--version', action='store_true', 
dest='version', default=0, help='show the version number and exit')
 
@@ -261,7 +271,7 @@
             tee_file = None
 
         # Test suite mode, therefore the args are the tests to run and not a 
script file.
-        if options.test_suite or options.system_tests or options.unit_tests:
+        if options.test_suite or options.system_tests or options.unit_tests 
or options.gui_tests:
             self.tests = args
 
         # The argument is a script.
@@ -292,7 +302,7 @@
             mode = 'info'
 
         # Run the relax tests.
-        elif options.test_suite or options.system_tests or 
options.unit_tests:
+        elif options.test_suite or options.system_tests or 
options.unit_tests or options.gui_tests:
             # Exclusive modes.
             if options.test:
                 parser.error("executing the relax test suite and running 
relax in test mode are mutually exclusive")
@@ -306,6 +316,11 @@
                 mode = 'system tests'
             elif options.unit_tests:
                 mode = 'unit tests'
+            elif options.gui_tests:
+                mode = 'GUI tests'
+
+            # Set the status flag.
+            status.test_mode = True
 
         # Test mode.
         elif options.test:
@@ -314,7 +329,7 @@
                 parser.error("a script should not be supplied in test mode")
 
             # Exclusive modes.
-            if options.test_suite or options.system_tests or 
options.unit_tests:
+            if options.test_suite or options.system_tests or 
options.unit_tests or options.gui_tests:
                 parser.error("the relax test mode and executing the test 
suite are mutually exclusive")
             elif options.licence:
                 parser.error("the relax modes test and licence are mutually 
exclusive")
@@ -329,7 +344,7 @@
                 parser.error("a script should not be supplied in test mode")
 
             # Exclusive modes.
-            if options.test_suite or options.system_tests or 
options.unit_tests:
+            if options.test_suite or options.system_tests or 
options.unit_tests or options.gui_tests:
                 parser.error("the relax licence mode and executing the test 
suite are mutually exclusive")
             elif options.test:
                 parser.error("the relax modes licence and test are mutually 
exclusive")
@@ -340,7 +355,7 @@
         # GUI.
         elif options.gui:
             # Exclusive models.
-            if options.test_suite or options.system_tests or 
options.unit_tests:
+            if options.test_suite or options.system_tests or 
options.unit_tests or options.gui_tests:
                 parser.error("the relax GUI mode and testing modes are 
mutually exclusive")
             elif options.licence:
                 parser.error("the relax GUI mode and licence mode are 
mutually exclusive")




Related Messages


Powered by MHonArc, Updated Thu Jul 28 19:40:03 2011