← Back to team overview

sikuli-driver team mailing list archive

[Bug 778672] Re: Test Run Button Not Visible After Syntax Error

 

*** This bug is a duplicate of bug 803795 ***
    https://bugs.launchpad.net/bugs/803795

** This bug has been marked a duplicate of bug 803795
   X-1.0rc2: IDE: Run button disabled after unit test stops with an exception

-- 
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

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/778672/+subscriptions


References