""" This test opens, modifies, builds and runs exemple project named "python".
Test succeeds if runtime's stdout behaves as expected
# allow module import from current test directory's parent
addImportPath(os.path.dirname(getBundlePath()))
# common test definitions module
from sikuliberemiz import *
proc,app = StartBeremizApp(exemple="python")
# To detect when actions did finish because IDE content isn't changing
idle = IDEIdleObserver(app)
doubleClick("1646062660770.png")
click("1646066794902.png")
type(Key.DOWN * 10, Key.CTRL)
doubleClick("1646066996620.png")
type(Key.TAB*3) # select text content
type("'sys.stdout.write(\"EDIT TEST OK\\n\")'")
stdoutIdle = stdoutIdleObserver(proc)
stdoutIdle.WaitForChangeAndIdle(2,15)
stdoutIdle.WaitForChangeAndIdle(2,15)
stdoutIdle.WaitForChangeAndIdle(2,15)
stdoutIdle.WaitForChangeAndIdle(2,15)
# wait 10 seconds for 10 Grumpfs
found = waitPatternInStdout(proc, "EDIT TEST OK", 10)