MCPcopy
hub / github.com/pallets/werkzeug / test_copies_are_mutable

Method test_copies_are_mutable

tests/test_datastructures.py:293–303  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

291 assert len(d) == 3
292
293 def test_copies_are_mutable(self):
294 cls = self.storage_class
295 immutable = cls({"a": 1})
296 with pytest.raises(TypeError):
297 immutable.pop("a")
298
299 mutable = immutable.copy()
300 mutable.pop("a")
301 assert "a" in immutable
302 assert mutable is not immutable
303 assert copy(immutable) is immutable
304
305 def test_dict_is_hashable(self):
306 cls = self.storage_class

Callers

nothing calls this directly

Calls 2

popMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected