Tests: do not finish program right after the printing, because slow Iron Python doesn't have enough time to pass it to output.

This commit is contained in:
Elizaveta Shashkova
2016-09-26 15:16:06 +03:00
parent 695221469c
commit 06e4de9367
2 changed files with 8 additions and 4 deletions
+5 -1
View File
@@ -1,3 +1,5 @@
from time import sleep
x = 0
print(x)
while x<2:
@@ -5,4 +7,6 @@ while x<2:
print(x)
x+=10
print("x = %d" % x)
print("x = %d" % x)
while True:
sleep(0.1)
@@ -360,15 +360,15 @@ public class PythonDebuggerTest extends PyEnvTestCase {
runPythonTest(new PyDebuggerTask("/debug", "test_runtoline.py") {
@Override
public void before() throws Exception {
toggleBreakpoint(getFilePath(getScriptName()), 1);
toggleBreakpoint(getFilePath(getScriptName()), 7);
toggleBreakpoint(getFilePath(getScriptName()), 3);
toggleBreakpoint(getFilePath(getScriptName()), 9);
}
@Override
public void testing() throws Exception {
waitForPause();
eval("x").hasValue("0");
runToLine(4);
runToLine(6);
eval("x").hasValue("1");
resume();
waitForPause();