MCPcopy
hub / github.com/pandas-dev/pandas / is_misnamed_test_class

Function is_misnamed_test_class

scripts/check_test_naming.py:67–76  ·  view source on GitHub ↗
(
    node: ast.expr | ast.stmt, names: Sequence[str], line: str
)

Source from the content-addressed store, hash-verified

65
66
67def is_misnamed_test_class(
68 node: ast.expr | ast.stmt, names: Sequence[str], line: str
69) -> bool:
70 return (
71 isinstance(node, ast.ClassDef)
72 and not node.name.startswith("Test")
73 and names.count(node.name) == 0
74 and not any(_is_register_dtype(decorator) for decorator in node.decorator_list)
75 and PRAGMA not in line
76 )
77
78
79def main(content: str, file: str) -> int:

Callers 1

mainFunction · 0.85

Calls 3

_is_register_dtypeFunction · 0.85
startswithMethod · 0.80
countMethod · 0.45

Tested by

no test coverage detected