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

Method test_unicode

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

Source from the content-addressed store, hash-verified

2990 self.assertIs(x.state[0], x)
2991
2992 def test_unicode(self):
2993 endcases = ['', '<\\u>', '<\\\u1234>', '<\n>',
2994 '<\\>', '<\\\U00012345>',
2995 # surrogates
2996 '<\udc80>']
2997 for proto in protocols:
2998 for u in endcases:
2999 p = self.dumps(u, proto)
3000 u2 = self.loads(p)
3001 self.assert_is_copy(u, u2)
3002
3003 def test_unicode_high_plane(self):
3004 t = '\U00012345'

Callers

nothing calls this directly

Calls 3

assert_is_copyMethod · 0.80
dumpsMethod · 0.45
loadsMethod · 0.45

Tested by

no test coverage detected