sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #02663
[Bug 778672] Re: Test Run Button Not Visible After Syntax Error
I tested the situation, and it seems to be recoverable, without
restarting the IDE:
a scenario description:
- you have made changes to your script, that might produce a syntax error
- you saved the script, without realizing the fact, that your script contains a syntax error
- in the unit test screen you press the little run button
- the IDE vanishes and the little menu appears in the screen's upper left
- now you realize that the IDE hangs, because it does not come back with the IDE window
- you press the abort key combination (shift-command-c on Mac, alt-shift-c on Windows)
- the IDE comes back and shows a syntax error in the message area
- the Unit Test screen does not show the Run button
- you repair the syntax error and save the script
- during this action the little menu in the upper left corner is still visible and can be activated to click the contained run button
- the test runs (if it does not produce more syntax errors)
- the IDE comes back and you are in the normal procedure again
This is tested on Mac and Win7 and should work on WinXP too.
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/778672
Title:
Test Run Button Not Visible After Syntax Error
Status in Sikuli:
New
Bug description:
I am running Sikuli X-1.0rc2 with Java 1.6.0_24 on Windows XP.
I was reproducing the Unit Test example provided by RaiMan at this link:
https://answers.launchpad.net/sikuli/+question/142947
This example worked correctly. I wanted to add an additional test to
experiment with multiple tests so here's what I did:
1) Copy and pasted the "test_empty" test case and modified so the
entire file looked like this:
def setUp(self):
print "in Setup"
def tearDown(self):
print "in tearDown"
def test_empty(self):
print "in test"
return True
def test_empty2(self):
print "in test2"
return True
NOTE: I did not correctly indent since I did not notice the error. If
I correct the indentation the tests run correctly.
2) Saved the file by using ctrl+s
3) Pressed ctrl+u to show the Unit Test tab
4) Pressed the Run button in the Unit Test tab
5) Got this window:
http://imageshack.us/photo/my-images/42/sikuliunittesterror1.png/
6) Pressed Run and nothing happened so I closed the window
7) Had to press alt+shift+c to break back into the IDE
8) The error message in the Message tab shows the problem:
Exception in thread "AWT-EventQueue-0" SyntaxError: ("mismatched input
'print' expecting INDENT", (' ', 24, 1, '\tprint "in test2"\n'))
9) The problem is I can't run another test unless I restart the IDE since the Run button is missing from the Unit Test tab:
http://imageshack.us/photo/my-images/121/sikuliunittesterror2.png/
Let me know if you need more information or if you want me to try a
debug build.
Thanks,
Derek
References