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

Method test_misc

Lib/test/pickletester.py:2471–2489  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2469 assert_is_copy = AbstractUnpickleTests.assert_is_copy
2470
2471 def test_misc(self):
2472 # test various datatypes not tested by testdata
2473 for proto in protocols:
2474 x = myint(4)
2475 s = self.dumps(x, proto)
2476 y = self.loads(s)
2477 self.assert_is_copy(x, y)
2478
2479 x = (1, ())
2480 s = self.dumps(x, proto)
2481 y = self.loads(s)
2482 self.assert_is_copy(x, y)
2483
2484 x = initarg(1, x)
2485 s = self.dumps(x, proto)
2486 y = self.loads(s)
2487 self.assert_is_copy(x, y)
2488
2489 # XXX test __reduce__ protocol?
2490
2491 def test_roundtrip_equality(self):
2492 expected = self._testdata

Callers

nothing calls this directly

Calls 5

initargClass · 0.85
assert_is_copyMethod · 0.80
myintClass · 0.70
dumpsMethod · 0.45
loadsMethod · 0.45

Tested by

no test coverage detected