diff --git a/python/testData/debug/test_winegg.py b/python/testData/debug/test_winegg.py new file mode 100644 index 000000000000..092aed5176fe --- /dev/null +++ b/python/testData/debug/test_winegg.py @@ -0,0 +1,8 @@ +from eggxample import MIXED_case, lower_case + +x = lower_case.add(7, 9) +print(x) + +x = MIXED_case.add(7, 10) +print(x) + diff --git a/python/testData/debug/wintestegg-0.1.egg b/python/testData/debug/wintestegg-0.1.egg new file mode 100644 index 000000000000..068e05ca747f Binary files /dev/null and b/python/testData/debug/wintestegg-0.1.egg differ diff --git a/python/testSrc/com/jetbrains/env/python/PythonDebuggerTest.java b/python/testSrc/com/jetbrains/env/python/PythonDebuggerTest.java index d883defa7b82..7db21fe94f89 100644 --- a/python/testSrc/com/jetbrains/env/python/PythonDebuggerTest.java +++ b/python/testSrc/com/jetbrains/env/python/PythonDebuggerTest.java @@ -539,6 +539,50 @@ public class PythonDebuggerTest extends PyEnvTestCase { }); } + + public void testWinEggDebug() throws Exception { + if (!SystemInfo.isWindows) + { + return; // Only needs to run on windows + } + runPythonTest(new PyDebuggerTask("/debug", "test_winegg.py") { + @Override + public void before() throws Exception { + String egg = getFilePath("wintestegg-0.1.egg"); + toggleBreakpointInEgg(egg, "eggxample/lower_case.py", 2); + toggleBreakpointInEgg(egg, "eggxample/MIXED_case.py", 2); + + PythonSdkFlavor flavor = PythonSdkFlavor.getFlavor(getRunConfiguration().getSdkHome()); + if (flavor != null) { + flavor.initPythonPath(Lists.newArrayList(egg), getRunConfiguration().getEnvs()); + } + else { + getRunConfiguration().getEnvs().put("PYTHONPATH", egg); + } + } + + @Override + public void testing() throws Exception { + waitForPause(); + eval("ret").hasValue("16"); + resume(); + + waitForPause(); + eval("ret").hasValue("17"); + resume(); + } + + @NotNull + @Override + public Set getTags() { + return ImmutableSet.of("-jython"); //TODO: fix that for Jython if anybody needs it + } + + + }); + } + + public void testStepOverConditionalBreakpoint() throws Exception { runPythonTest(new PyDebuggerTask("/debug", "test_stepOverCondition.py") { @Override