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

Method test_clear

Lib/test/mapping_tests.py:377–382  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

375 self.assertRaises(TypeError, d.__getitem__)
376
377 def test_clear(self):
378 d = self._full_mapping({1:1, 2:2, 3:3})
379 d.clear()
380 self.assertEqual(d, {})
381
382 self.assertRaises(TypeError, d.clear, None)
383
384 def test_update(self):
385 BasicTestMappingProtocol.test_update(self)

Callers

nothing calls this directly

Calls 4

_full_mappingMethod · 0.45
clearMethod · 0.45
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected