void (@NotNull PyUnitTestConfiguration configuration, @NotNull PsiElement elementToRightClickOn) { super.checkConfiguration(configuration, elementToRightClickOn); configuration.getWorkingDirectorySafe(); final PyFunction function = (PyFunction)elementToRightClickOn; if (function.getName().equals("test_relative")) { assertThat(configuration.getWorkingDirectory()) .describedAs("Wrong dir for relative import") .endsWith("testRelativeImport"); assertEquals("Bad target", "src.tests.test_relative.ModuleTest.test_relative", configuration.getTarget().getTarget()); } else if (function.getName().equals("test_no_relative")) { assertThat(configuration.getWorkingDirectory()) .describedAs("Wrong dir for non relative import") .endsWith("testRelativeImport/src/tests"); assertEquals("Bad target", "test_no_relative.ModuleTest.test_no_relative", configuration.getTarget().getTarget()); } else { throw new AssertionError("Unexpected function " + function.getName()); } }