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

Function test_setitem_deleted_meanwhile

testing/test_monkeypatch.py:131–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129
130
131def test_setitem_deleted_meanwhile() -> None:
132 d: Dict[str, object] = {}
133 monkeypatch = MonkeyPatch()
134 monkeypatch.setitem(d, "x", 2)
135 del d["x"]
136 monkeypatch.undo()
137 assert not d
138
139
140@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