PyTestTestProcessRunner () { return new PyTestTestProcessRunner("", 0) { @Override protected void configurationCreatedAndWillLaunch(@NotNull final PyTestConfiguration configuration) throws IOException { super.configurationCreatedAndWillLaunch(configuration); configuration.setWorkingDirectory(null); final VirtualFile fullFilePath = myFixture.getTempDirFixture().getFile("dir_test.py"); assert fullFilePath != null : String.format("No dir_test.py in %s", myFixture.getTempDirFixture().getTempDirPath()); configuration.getTarget().setTarget(fullFilePath.getPath()); configuration.getTarget().setTargetType(PyRunTargetVariant.PATH); } }; }