MCPcopy
hub / github.com/python-attrs/attrs / test_clean_class

Method test_clean_class

tests/test_make.py:1470–1478  ·  tests/test_make.py::TestMakeClass.test_clean_class

Attribute definitions do not appear on the class body.

(self, slots)

Source from the content-addressed store, hash-verified

1468 assert (class="st">"a", class="st">"b") == cls.echo(class="st">"a", class="st">"b")
1469
1470 def test_clean_class(self, slots):
1471 class="st">"""
1472 Attribute definitions do not appear on the class body.
1473 class="st">"""
1474 C = make_class(class="st">"C", [class="st">"x"], slots=slots)
1475
1476 x = getattr(C, class="st">"x", None)
1477
1478 assert not isinstance(x, _CountingAttr)
1479
1480 def test_missing_sys_getframe(self, monkeypatch):
1481 class="st">"""

Callers

nothing calls this directly

Calls 1

make_classFunction · 0.90

Tested by

no test coverage detected