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

Method test_copy

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

Source from the content-addressed store, hash-verified

466 self.assertFalse(morsel != dict(morsel))
467
468 def test_copy(self):
469 morsel_a = cookies.Morsel()
470 morsel_a.set('foo', 'bar', 'baz')
471 morsel_a.update({
472 'version': 2,
473 'comment': 'foo',
474 })
475 morsel_b = morsel_a.copy()
476 self.assertIsInstance(morsel_b, cookies.Morsel)
477 self.assertIsNot(morsel_a, morsel_b)
478 self.assertEqual(morsel_a, morsel_b)
479
480 morsel_b = copy.copy(morsel_a)
481 self.assertIsInstance(morsel_b, cookies.Morsel)
482 self.assertIsNot(morsel_a, morsel_b)
483 self.assertEqual(morsel_a, morsel_b)
484
485 def test_setitem(self):
486 morsel = cookies.Morsel()

Callers

nothing calls this directly

Calls 7

setMethod · 0.95
updateMethod · 0.95
copyMethod · 0.95
assertIsInstanceMethod · 0.80
assertIsNotMethod · 0.80
assertEqualMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected