Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(26888)

Delta Between Two Patch Sets: Lib/test/support.py

Issue 13390: Hunt memory allocations in addition to reference leaks
Left Patch Set: Created 6 years, 9 months ago
Right Patch Set: Created 6 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/test/regrtest.py ('k') | Lib/test/test_sys.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(Both sides are equal)
1 """Supporting definitions for the Python regression tests.""" 1 """Supporting definitions for the Python regression tests."""
2 2
3 if __name__ != 'test.support': 3 if __name__ != 'test.support':
4 raise ImportError('support must be imported from the test package') 4 raise ImportError('support must be imported from the test package')
5 5
6 import contextlib 6 import contextlib
7 import errno 7 import errno
8 import functools 8 import functools
9 import gc 9 import gc
10 import socket 10 import socket
(...skipping 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1927 def cleanup(): 1927 def cleanup():
1928 if attr_is_local: 1928 if attr_is_local:
1929 setattr(object_to_patch, attr_name, old_value) 1929 setattr(object_to_patch, attr_name, old_value)
1930 else: 1930 else:
1931 delattr(object_to_patch, attr_name) 1931 delattr(object_to_patch, attr_name)
1932 1932
1933 test_instance.addCleanup(cleanup) 1933 test_instance.addCleanup(cleanup)
1934 1934
1935 # actually override the attribute 1935 # actually override the attribute
1936 setattr(object_to_patch, attr_name, new_value) 1936 setattr(object_to_patch, attr_name, new_value)
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+