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

Method test_copy

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

Source from the content-addressed store, hash-verified

475 self.assertRaises(Exc, baddict2.fromkeys, [1])
476
477 def test_copy(self):
478 d = self._full_mapping({1:1, 2:2, 3:3})
479 self.assertEqual(d.copy(), {1:1, 2:2, 3:3})
480 d = self._empty_mapping()
481 self.assertEqual(d.copy(), d)
482 self.assertIsInstance(d.copy(), d.__class__)
483 self.assertRaises(TypeError, d.copy, None)
484
485 def test_get(self):
486 BasicTestMappingProtocol.test_get(self)

Callers

nothing calls this directly

Calls 6

assertIsInstanceMethod · 0.80
_full_mappingMethod · 0.45
assertEqualMethod · 0.45
copyMethod · 0.45
_empty_mappingMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected