Skip to content

Commit c9e0651

Browse files
committed
tests: add a classmethod to examples in tests
1 parent 2ae3675 commit c9e0651

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

quartodoc/tests/example_class.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ def some_method(self):
2929
def some_property(self):
3030
"""A property"""
3131

32+
@classmethod
33+
def some_class_method(cls):
34+
"""A class method"""
35+
3236
class D:
3337
"""A nested class"""
3438

quartodoc/tests/test_builder_blueprint.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,19 @@ def _check_member_names(members, expected):
183183
[
184184
("attributes", {"some_property", "z", "SOME_ATTRIBUTE"}),
185185
("classes", {"D"}),
186-
("functions", {"some_method"}),
186+
("functions", {"some_method", "some_class_method"}),
187187
],
188188
)
189189
def test_blueprint_fetch_members_include_kind_false(kind, removed):
190190
option = {f"include_{kind}": False}
191-
all_members = {"SOME_ATTRIBUTE", "z", "some_property", "some_method", "D"}
191+
all_members = {
192+
"SOME_ATTRIBUTE",
193+
"z",
194+
"some_property",
195+
"some_method",
196+
"D",
197+
"some_class_method",
198+
}
192199

193200
auto = lo.Auto(name="quartodoc.tests.example_class.C", **option)
194201
bp = blueprint(auto)

0 commit comments

Comments
 (0)