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

test_unittest fails when hunting reference leaks #74996

Closed
vstinner opened this issue Jun 30, 2017 · 6 comments
Closed

test_unittest fails when hunting reference leaks #74996

vstinner opened this issue Jun 30, 2017 · 6 comments
Labels

Comments

@vstinner
Copy link
Member

vstinner commented Jun 30, 2017

BPO 30813
Nosy @vstinner, @serhiy-storchaka
PRs
  • bpo-30813: Fix unittest when hunting refleaks #2502
  • [3.6] bpo-30813: Fix unittest when hunting refleaks (#2502) #2505
  • [3.5] bpo-30813: Fix unittest when hunting refleaks (#2502) #2506
  • 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 2017-06-30.11:23:29.315>
    created_at = <Date 2017-06-30.09:50:28.320>
    labels = ['3.7']
    title = 'test_unittest fails when hunting reference leaks'
    updated_at = <Date 2017-07-11.07:03:41.837>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-07-11.07:03:41.837>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-06-30.11:23:29.315>
    closer = 'vstinner'
    components = []
    creation = <Date 2017-06-30.09:50:28.320>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30813
    keywords = []
    message_count = 6.0
    messages = ['297370', '297371', '297376', '297386', '297390', '298134']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'serhiy.storchaka']
    pr_nums = ['2502', '2505', '2506']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue30813'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 30, 2017

    Example of Python 3.5 (same error on master):

    haypo@selma$ ./python -m test -R 3:3 -v test_unittest
    (...)
    ======================================================================
    ERROR: test_discover_with_init_module_that_raises_SkipTest_on_import (unittest.test.test_discovery.TestDiscovery)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/home/haypo/prog/python/3.5/Lib/unittest/test/test_discovery.py", line 572, in test_discover_with_init_module_that_raises_SkipTest_on_import
        pickle.loads(pickle.dumps(suite, proto))
    _pickle.PicklingError: Can't pickle <class 'unittest.loader.ModuleSkipped'>: attribute lookup ModuleSkipped on unittest.loader failed

    ======================================================================
    ERROR: test_discover_with_module_that_raises_SkipTest_on_import (unittest.test.test_discovery.TestDiscovery)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/home/haypo/prog/python/3.5/Lib/unittest/test/test_discovery.py", line 548, in test_discover_with_module_that_raises_SkipTest_on_import
        pickle.loads(pickle.dumps(suite, proto))
    _pickle.PicklingError: Can't pickle <class 'unittest.loader.ModuleSkipped'>: attribute lookup ModuleSkipped on unittest.loader failed

    @vstinner vstinner added the 3.7 label Jun 30, 2017
    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 30, 2017

    Using --huntrleaks in regrtest runs this statement in regrtest:

       unittest.BaseTestSuite._cleanup = False

    This line comes from bpo-11798.

    #2502 fixes this issue.

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 30, 2017

    New changeset e4f9a2d by Victor Stinner in branch 'master':
    bpo-30813: Fix unittest when hunting refleaks (bpo-2502)
    e4f9a2d

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 30, 2017

    New changeset 714afcc by Victor Stinner in branch '3.5':
    bpo-30813: Fix unittest when hunting refleaks (bpo-2502) (bpo-2506)
    714afcc

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 30, 2017

    New changeset 22d4e8f by Victor Stinner in branch '3.6':
    bpo-30813: Fix unittest when hunting refleaks (bpo-2502) (bpo-2505)
    22d4e8f

    @serhiy-storchaka
    Copy link
    Member

    serhiy-storchaka commented Jul 11, 2017

    Ah, this fixed bpo-25746!

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants