diff --git a/src/test_typing.py b/src/test_typing.py index fd2d93c3..a351be1d 100644 --- a/src/test_typing.py +++ b/src/test_typing.py @@ -1069,6 +1069,13 @@ class Node(Generic[T]): ... for t in things + [Any]: self.assertEqual(t, copy(t)) self.assertEqual(t, deepcopy(t)) + if sys.version_info >= (3, 3): + # From copy module documentation: + # It does "copy" functions and classes (shallow and deeply), by returning + # the original object unchanged; this is compatible with the way these + # are treated by the pickle module. + self.assertTrue(t is copy(t)) + self.assertTrue(t is deepcopy(t)) def test_weakref_all(self): T = TypeVar('T')