Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a comment here explaining why we need this?

# 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')
Expand Down