MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_copy

Method test_copy

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

Source from the content-addressed store, hash-verified

444 self.assertFalse(morsel != dict(morsel))
445
446 def test_copy(self):
447 morsel_a = cookies.Morsel()
448 morsel_a.set('foo', 'bar', 'baz')
449 morsel_a.update({
450 'version': 2,
451 'comment': 'foo',
452 })
453 morsel_b = morsel_a.copy()
454 self.assertIsInstance(morsel_b, cookies.Morsel)
455 self.assertIsNot(morsel_a, morsel_b)
456 self.assertEqual(morsel_a, morsel_b)
457
458 morsel_b = copy.copy(morsel_a)
459 self.assertIsInstance(morsel_b, cookies.Morsel)
460 self.assertIsNot(morsel_a, morsel_b)
461 self.assertEqual(morsel_a, morsel_b)
462
463 def test_setitem(self):
464 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