Skip to content

Commit 45740dc

Browse files
committed
test(class): add regression test for classmethod filtering
1 parent 666038d commit 45740dc

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/test_class.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,11 @@ def test_class_inheritance():
7070
def test_class_includes_classmethods_when_enabled():
7171
cls = Class(ExampleClassC, classmethod=True)
7272
assert "class_method" in [method.name for method in cls.methods]
73+
74+
75+
def test_instance_classmethod_filter_only_excludes_classmethods():
76+
instance = ExampleClassC()
77+
cls = Class(instance, classmethod=False)
78+
method_names = [method.name for method in cls.methods]
79+
assert "public_method" in method_names
80+
assert "class_method" not in method_names

0 commit comments

Comments
 (0)