MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_unknown_attr

Method test_unknown_attr

testing/test_monkeypatch.py:77–79  ·  view source on GitHub ↗
(self, monkeypatch: MonkeyPatch)

Source from the content-addressed store, hash-verified

75 monkeypatch.setattr("unkn123.classx", None)
76
77 def test_unknown_attr(self, monkeypatch: MonkeyPatch) -> None:
78 with pytest.raises(AttributeError):
79 monkeypatch.setattr("os.path.qweqwe", None)
80
81 def test_unknown_attr_non_raising(self, monkeypatch: MonkeyPatch) -> None:
82 # https://github.com/pytest-dev/pytest/issues/746

Callers

nothing calls this directly

Calls 1

setattrMethod · 0.80

Tested by

no test coverage detected