boolean (@NotNull final PyFunction function, @NotNull final ThreeState testCaseClassRequired, @Nullable final TypeEvalContext context) { if (!PythonUnitTestDetectorsKt.isTestFunction(function)) { // Since there are a lot of ways to launch assert in modern frameworks, // we assume any function with "test" word in name is test return false; } // If testcase not required then any test function is test final PyClass aClass = function.getContainingClass(); if (!isTestCaseClassRequired(function, testCaseClassRequired) && aClass == null) { return true; } return aClass != null && isTestClass(aClass, testCaseClassRequired, context); }