if threading.current_thread().getName() == "MainThread":
// Don"t run GUI tests in the main thread.
sys.stderr.write( "NOSE WAS RUN FROM THE MAIN THREAD. SKIPPING GUI TEST\n" )
raise nose.SkipTest
else:
// We"re currently running in a non-main thread.
// Start the gui IN THE MAIN THREAD. Workflow is provided by our subclass.
run_in_main_thread( createApp )
After Change
// If test was run from the main thread, exit now.
// If test is running in a non-main thread, we assume the main thread is available to launch the gui.
if is_main_thread():
pytest.xfail("Launched GUI test from MainThread. Skipping test.")
// We"re currently running in a non-main thread.
// Start the gui IN THE MAIN THREAD. Workflow is provided by our subclass.
run_in_main_thread( createApp )
appCreationEvent.wait()