Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove randomness from test_exceptions #43469

Closed
zseil mannequin opened this issue Jun 7, 2006 · 2 comments
Closed

Remove randomness from test_exceptions #43469

zseil mannequin opened this issue Jun 7, 2006 · 2 comments
Labels
tests Tests in the Lib/test dir

Comments

@zseil
Copy link
Mannequin

zseil mannequin commented Jun 7, 2006

BPO 1501987
Nosy @tim-one
Files
  • test_exceptions.diff: patch against revision 46702
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2006-06-07.07:00:17.000>
    created_at = <Date 2006-06-07.03:09:23.000>
    labels = ['tests']
    title = 'Remove randomness from test_exceptions'
    updated_at = <Date 2006-06-07.07:00:17.000>
    user = 'https://bugs.python.org/zseil'

    bugs.python.org fields:

    activity = <Date 2006-06-07.07:00:17.000>
    actor = 'tim.peters'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Tests']
    creation = <Date 2006-06-07.03:09:23.000>
    creator = 'zseil'
    dependencies = []
    files = ['7317']
    hgrepos = []
    issue_num = 1501987
    keywords = ['patch']
    message_count = 2.0
    messages = ['50441', '50442']
    nosy_count = 2.0
    nosy_names = ['tim.peters', 'zseil']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1501987'
    versions = ['Python 2.5']

    @zseil
    Copy link
    Mannequin Author

    zseil mannequin commented Jun 7, 2006

    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.

    @zseil zseil mannequin closed this as completed Jun 7, 2006
    @zseil zseil mannequin added the tests Tests in the Lib/test dir label Jun 7, 2006
    @zseil zseil mannequin closed this as completed Jun 7, 2006
    @zseil zseil mannequin added the tests Tests in the Lib/test dir label Jun 7, 2006
    @tim-one
    Copy link
    Member

    tim-one commented Jun 7, 2006

    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!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant