mirror of https://github.com/python/cpython
bpo-44353: Improve tests covering typing.NewType pickling (GH-27302)
This commit is contained in:
parent
8072a1181d
commit
a22b05da87
|
@ -3755,6 +3755,7 @@ class NewTypeTests:
|
|||
def test_pickle(self):
|
||||
UserAge = self.module.NewType('UserAge', float)
|
||||
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
|
||||
with self.subTest(proto=proto):
|
||||
pickled = pickle.dumps(UserId, proto)
|
||||
loaded = pickle.loads(pickled)
|
||||
self.assertIs(loaded, UserId)
|
||||
|
|
Loading…
Reference in New Issue