MCPcopy
hub / github.com/pytest-dev/pytest / test_setitem_deleted_meanwhile

Function test_setitem_deleted_meanwhile

testing/test_monkeypatch.py:156–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154
155
156def test_setitem_deleted_meanwhile() -> None:
157 d: dict[str, object] = {}
158 monkeypatch = MonkeyPatch()
159 monkeypatch.setitem(d, "x", 2)
160 del d["x"]
161 monkeypatch.undo()
162 assert not d
163
164
165@pytest.mark.parametrize("before", [True, False])

Callers

nothing calls this directly

Calls 3

setitemMethod · 0.95
undoMethod · 0.95
MonkeyPatchClass · 0.90

Tested by

no test coverage detected