void () { runPythonTest(new CreateConfigurationTestTask<>(getFrameworkId(), PyTestConfiguration.class) { @NotNull @Override protected List<PsiElement> getPsiElementsToRightClickOn() { configureSrcFolder(myFixture); myFixture.configureByFile("test_with_src/foo/src/test_test.py"); final PyFunction test = myFixture.findElementByText("test_test", PyFunction.class); assert test != null; return Collections.singletonList(test); } @Override protected void checkConfiguration(@NotNull PyTestConfiguration configuration, @NotNull PsiElement elementToRightClickOn) { super.checkConfiguration(configuration, elementToRightClickOn); assertThat("Wrong configuration directory set on new config", configuration.getWorkingDirectory(), Matchers.endsWith("src")); } }); }