diff --git a/python/src/com/jetbrains/python/testing/PythonTestConfigurationProducer.java b/python/src/com/jetbrains/python/testing/PythonTestConfigurationProducer.java index 52140459013b..c1dd4dc79622 100644 --- a/python/src/com/jetbrains/python/testing/PythonTestConfigurationProducer.java +++ b/python/src/com/jetbrains/python/testing/PythonTestConfigurationProducer.java @@ -50,7 +50,7 @@ abstract public class PythonTestConfigurationProducer extends RuntimeConfigurati settings = createConfigurationFromFolder(location); if (settings != null) return settings; - final PyElement pyElement = PsiTreeUtil.getParentOfType(location.getPsiElement(), PyElement.class); + final PyElement pyElement = PsiTreeUtil.getParentOfType(location.getPsiElement(), PyElement.class, false); if (pyElement != null) { settings = createConfigurationFromFunction(location, pyElement); if (settings != null) return settings;