From 5f95cf372e11c481a8dcddef4959f3b3bffa199c Mon Sep 17 00:00:00 2001 From: Mikhail Golubev Date: Fri, 29 Mar 2024 20:27:10 +0200 Subject: [PATCH] [python] Make PyIntentionTest.doMultiFileTest not copy the target file twice to the test root Previously, a multi-file test copied a target entry file both as myTestName.py and intentions/MyTestName/myTestName.py. As a result, it was impossible to use relative imports in this file because it resided at a different level than the rest of the files from the test resource directory. GitOrigin-RevId: 8d19e038357fc641e8b5ecf5a1d64f0e4dc87d11 --- .../com/jetbrains/python/intentions/PyIntentionTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/testSrc/com/jetbrains/python/intentions/PyIntentionTest.java b/python/testSrc/com/jetbrains/python/intentions/PyIntentionTest.java index 61f3e74e4f84..e92047852696 100644 --- a/python/testSrc/com/jetbrains/python/intentions/PyIntentionTest.java +++ b/python/testSrc/com/jetbrains/python/intentions/PyIntentionTest.java @@ -57,12 +57,12 @@ public class PyIntentionTest extends PyTestCase { private void doMultiFileTest(@NotNull String hint) { final String directoryPath = "intentions/" + getTestName(false); - final String filesPathPrefix = directoryPath + "/" + getTestName(true); + final String filesPathPrefix = getTestName(true); myFixture.copyDirectoryToProject(directoryPath, ""); myFixture.configureByFile(filesPathPrefix + ".py"); final IntentionAction action = myFixture.findSingleIntention(hint); myFixture.launchAction(action); - myFixture.checkResultByFile(filesPathPrefix + ".py", filesPathPrefix + "_after.py", false); + myFixture.checkResultByFile(filesPathPrefix + ".py", directoryPath + "/" + filesPathPrefix + "_after.py", false); } /**