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

Method test_pickle

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

Source from the content-addressed store, hash-verified

295 self.assertEqual(C.output(), '')
296
297 def test_pickle(self):
298 rawdata = 'Customer="WILE_E_COYOTE"; Path=/acme; Version=1'
299 expected_output = 'Set-Cookie: %s' % rawdata
300
301 C = cookies.SimpleCookie()
302 C.load(rawdata)
303 self.assertEqual(C.output(), expected_output)
304
305 for proto in range(pickle.HIGHEST_PROTOCOL + 1):
306 with self.subTest(proto=proto):
307 C1 = pickle.loads(pickle.dumps(C, protocol=proto))
308 self.assertEqual(C1.output(), expected_output)
309
310 def test_illegal_chars(self):
311 rawdata = "a=b; c,d=e"

Callers

nothing calls this directly

Calls 6

subTestMethod · 0.80
loadMethod · 0.45
assertEqualMethod · 0.45
outputMethod · 0.45
loadsMethod · 0.45
dumpsMethod · 0.45

Tested by

no test coverage detected