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

Method test_missing_sys_getframe

tests/test_make.py:1480–1487  ·  tests/test_make.py::TestMakeClass.test_missing_sys_getframe

`make_class()` does not fail when `sys._getframe()` is not available.

(self, monkeypatch)

Source from the content-addressed store, hash-verified

1478 assert not isinstance(x, _CountingAttr)
1479
1480 def test_missing_sys_getframe(self, monkeypatch):
1481 class="st">"""
1482 `make_class()` does not fail when `sys._getframe()` is not available.
1483 class="st">"""
1484 monkeypatch.delattr(sys, class="st">"_getframe")
1485 C = make_class(class="st">"C", [class="st">"x"])
1486
1487 assert 1 == len(C.__attrs_attrs__)
1488
1489 def test_make_class_ordered(self):
1490 class="st">"""

Callers

nothing calls this directly

Calls 1

make_classFunction · 0.90

Tested by

no test coverage detected