This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Remove randomness from test_exceptions
Type: Stage:
Components: Tests Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: tim.peters, zseil
Priority: normal Keywords: patch

Created on 2006-06-07 03:09 by zseil, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_exceptions.diff zseil, 2006-06-07 03:09 patch against revision 46702
Messages (2)
msg50441 - (view) Author: Ziga Seilnacht (zseil) * (Python committer) Date: 2006-06-07 03:09
Recently test_exceptions was reporting random
memory leaks. It seems that this was caused
by the pickling part of testAttributes, which
uses a random integer for pickling protocol.
With this patch applied, I couldn't reproduce
the leak anymore, although I didn't run it 666
times.
The patch also includes a fix for the pickling
part of the test (previously it was checking
the attributes of the original exception, not
the unpickled one), removes another unused
import and moves all the imports to the
top of the file.
msg50442 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2006-06-07 07:00
Logged In: YES 
user_id=31435

Woo hoo!  This appears to cure the oddball "leaks" for me
too, but no idea why.  Outstanding anyway ;-)

I fiddled the patch a bit to exercise both pickle and
cPickle,  and to use pickle.HIGHEST_PROTOCOL instead of the
hardcoded 2.  Checked in as revision 46705 on the trunk. 
Thank you!
History
Date User Action Args
2022-04-11 14:56:17adminsetgithub: 43469
2006-06-07 03:09:23zseilcreate