PY-45659 Add test for isolated mode

IDEA-CR-69971

GitOrigin-RevId: 9ec5bc07508724522604a4be9c4a848c013c4193
This commit is contained in:
Elizaveta Shashkova
2020-12-31 11:13:02 +00:00
committed by intellij-monorepo-bot
parent 6e3c457f43
commit 65d516de9d
2 changed files with 33 additions and 0 deletions
@@ -0,0 +1,8 @@
from __future__ import print_function
import os
import subprocess
import sys
ret = subprocess.call([os.path.abspath(sys.executable), "-I", "-m", "test_python_subprocess_another_helper"])
print("Module returned code %d" % ret)
@@ -213,4 +213,29 @@ public class PythonDebuggerMultiprocessingTest extends PyEnvTestCase {
}
});
}
@Test
public void testSubprocessIsolated() {
runPythonTest(new PyDebuggerMultiprocessTask("/debug", "test_subprocess_isolated.py") {
@Override
public void before() {
toggleBreakpoint(getFilePath("test_python_subprocess_another_helper.py"), 2);
setWaitForTermination(false);
}
@Override
public void testing() throws Exception {
waitForPause();
eval("x").hasValue("42");
resume();
waitForOutput("Module returned code 0");
}
@NotNull
@Override
public Set<String> getTags() {
return Sets.newHashSet("python3");
}
});
}
}