MCPcopy Index your code
hub / github.com/python/cpython / test_mutating_iteration_delete_over_items

Method test_mutating_iteration_delete_over_items

Lib/test/test_dict.py:628–635  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

626 d[0] = 0
627
628 def test_mutating_iteration_delete_over_items(self):
629 # change dict content during iteration
630 d = {}
631 d[0] = 0
632 with self.assertRaises(RuntimeError):
633 for i in d.items():
634 del d[0]
635 d[0] = 0
636
637 def test_mutating_lookup(self):
638 # changing dict during a lookup (issue #14417)

Callers

nothing calls this directly

Calls 2

assertRaisesMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected