[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
This commit is contained in:
Mikhail Golubev
2024-04-02 18:57:35 +00:00
committed by intellij-monorepo-bot
parent c9613fd97b
commit 5f95cf372e
@@ -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);
}
/**