diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index f32bb31280a8ef..15f6b6ae3ce4fb 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -5177,6 +5177,18 @@ class C(B[int]): x = pickle.loads(z) self.assertEqual(s, x) + # Test ParamSpec args and kwargs + global PP + PP = ParamSpec('PP') + for thing in [PP.args, PP.kwargs]: + for proto in range(pickle.HIGHEST_PROTOCOL + 1): + with self.subTest(thing=thing, proto=proto): + self.assertEqual( + pickle.loads(pickle.dumps(thing, proto)), + thing, + ) + del PP + def test_copy_and_deepcopy(self): T = TypeVar('T') class Node(Generic[T]): ...