void () { runPythonTest(new CreateConfigurationTestTask<>(getFrameworkId(), PyTestConfiguration.class) { private static final String FOLDER_NAME = "same_names"; @Override public void runTestOn(@NotNull String sdkHome, @Nullable Sdk existingSdk) throws InvalidSdkException { markFolderAsTestRoot(FOLDER_NAME); super.runTestOn(sdkHome, existingSdk); } @Override protected void checkConfiguration(@NotNull final PyTestConfiguration configuration, @NotNull final PsiElement elementToRightClickOn) { assertEquals("Wrong target fore newly created element", "true.test_something.test_test", configuration.getTarget().getTarget()); } @NotNull @Override protected List<PsiElement> getPsiElementsToRightClickOn() { var file = (PyFile)myFixture.configureByFile(FOLDER_NAME + "/true/test_something.py"); PyFunction test = file.findTopLevelFunction("test_test"); assert test != null : "No test_test found"; return Collections.singletonList(test); } }); }