AbstractPythonRunConfiguration (@NotNull String sdkHome, @Nullable Sdk existingSdk) { ConfigurationFactory factory = PythonConfigurationType.getInstance().getConfigurationFactories()[0]; mySettings = RunManager.getInstance(getProject()).createConfiguration("test", factory); PythonRunConfiguration runConfiguration = (PythonRunConfiguration)mySettings.getConfiguration(); runConfiguration.setSdkHome(sdkHome); runConfiguration.setSdk(existingSdk); runConfiguration.setScriptName(getScriptName()); runConfiguration.setWorkingDirectory(myFixture.getTempDirPath()); runConfiguration.setScriptParameters(getScriptParameters()); runConfiguration.setEnvs(getEnvs()); return runConfiguration; }