boolean (@NotNull final PyFunction pyFunction, @NotNull final AbstractPythonLegacyTestRunConfiguration configuration) { final PyClass containingClass = pyFunction.getContainingClass(); configuration.setMethodName(pyFunction.getName()); if (containingClass != null) { configuration.setClassName(containingClass.getName()); configuration.setTestType(AbstractPythonLegacyTestRunConfiguration.TestType.TEST_METHOD); } else { configuration.setTestType(AbstractPythonLegacyTestRunConfiguration.TestType.TEST_FUNCTION); } return setupConfigurationScript(configuration, pyFunction); }