(
node: ast.expr | ast.stmt, names: Sequence[str], line: str
)
| 51 | |
| 52 | |
| 53 | def is_misnamed_test_func( |
| 54 | node: ast.expr | ast.stmt, names: Sequence[str], line: str |
| 55 | ) -> bool: |
| 56 | return ( |
| 57 | isinstance(node, ast.FunctionDef) |
| 58 | and not node.name.startswith("test") |
| 59 | and names.count(node.name) == 0 |
| 60 | and not any(_is_fixture(decorator) for decorator in node.decorator_list) |
| 61 | and PRAGMA not in line |
| 62 | and node.name |
| 63 | not in ("teardown_method", "setup_method", "teardown_class", "setup_class") |
| 64 | ) |
| 65 | |
| 66 | |
| 67 | def is_misnamed_test_class( |
no test coverage detected