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

./python -m test test___all__ test_binhex fails #85099

Closed
remilapeyre mannequin opened this issue Jun 9, 2020 · 5 comments
Closed

./python -m test test___all__ test_binhex fails #85099

remilapeyre mannequin opened this issue Jun 9, 2020 · 5 comments
Labels
3.9 only security fixes 3.10 only security fixes tests Tests in the Lib/test dir

Comments

@remilapeyre
Copy link
Mannequin

remilapeyre mannequin commented Jun 9, 2020

BPO 40927
Nosy @vstinner, @remilapeyre
PRs
  • bpo-40927: Reload binhex module to test warning #20758
  • bpo-40927: Fix test_binhex when run twice #20764
  • [3.9] bpo-40927: Fix test_binhex when run twice (GH-20764) #20789
  • 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 2021-12-13.17:14:57.839>
    created_at = <Date 2020-06-09.10:47:16.499>
    labels = ['tests', '3.9', '3.10']
    title = './python -m test test___all__ test_binhex fails'
    updated_at = <Date 2021-12-13.17:26:33.332>
    user = 'https://github.com/remilapeyre'

    bugs.python.org fields:

    activity = <Date 2021-12-13.17:26:33.332>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-12-13.17:14:57.839>
    closer = 'iritkatriel'
    components = ['Tests']
    creation = <Date 2020-06-09.10:47:16.499>
    creator = 'remi.lapeyre'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40927
    keywords = ['patch']
    message_count = 5.0
    messages = ['371090', '371228', '371231', '371232', '408469']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'remi.lapeyre']
    pr_nums = ['20758', '20764', '20789']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue40927'
    versions = ['Python 3.9', 'Python 3.10']

    @remilapeyre
    Copy link
    Mannequin Author

    remilapeyre mannequin commented Jun 9, 2020

    It looks like the warning registry does not get flushed properly:

    ./python -m test test___all__ test_binhex
    0:00:00 load avg: 1.55 Run tests sequentially
    0:00:00 load avg: 1.55 [1/2] test___all__
    0:00:01 load avg: 1.55 [2/2] test_binhex
    test test_binhex crashed -- Traceback (most recent call last):
      File "/Users/remi/src/cpython/Lib/test/libregrtest/runtest.py", line 270, in _runtest_inner
        refleak = _runtest_inner2(ns, test_name)
      File "/Users/remi/src/cpython/Lib/test/libregrtest/runtest.py", line 221, in _runtest_inner2
        the_module = importlib.import_module(abstest)
      File "/Users/remi/src/cpython/Lib/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 790, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "/Users/remi/src/cpython/Lib/test/test_binhex.py", line 10, in <module>
        import binhex
      File "/Users/remi/src/cpython/Lib/contextlib.py", line 124, in __exit__
        next(self.gen)
      File "/Users/remi/src/cpython/Lib/test/support/__init__.py", line 1166, in _filterwarnings
        raise AssertionError("filter (%r, %s) did not catch any warning" %
    AssertionError: filter ('', DeprecationWarning) did not catch any warning

    test_binhex failed

    == Tests result: FAILURE ==

    1 test OK.

    1 test failed:
    test_binhex

    Total duration: 2.0 sec
    Tests result: FAILURE

    It's not a very issue but does appear when running refleaks on the whole stdlib.

    @remilapeyre remilapeyre mannequin added 3.10 only security fixes tests Tests in the Lib/test dir labels Jun 9, 2020
    @vstinner
    Copy link
    Member

    New changeset 9c24e2e by Victor Stinner in branch 'master':
    bpo-40927: Fix test_binhex when run twice (GH-20764)
    9c24e2e

    @vstinner
    Copy link
    Member

    New changeset af69325 by Victor Stinner in branch '3.9':
    bpo-40927: Fix test_binhex when run twice (GH-20764) (GH-20789)
    af69325

    @vstinner
    Copy link
    Member

    Rémi Lapeyre: Thanks for the bug report, it's now fixed!

    @vstinner vstinner added 3.9 only security fixes labels Jun 10, 2020
    @vstinner
    Copy link
    Member

    Oh thanks Irit! It's too easy to forget closing an issue!

    @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
    3.9 only security fixes 3.10 only security fixes tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants