Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Test failure in tests/test_optimizer.py #115058

Copy link
Copy link
Closed
@freakboy3742

Description

@freakboy3742
Issue body actions

Bug report

Bug description:

As of 01dceba, I'm seeing a test failure on macOS and iOS in the tests/test_optimizer.py test case.

If you run the test by itself, (python -m test tests/test_optimizer.py) it passes.

However, if you run the entire test suite in default (alphabetical) order, it fails:

test test_optimizer failed -- Traceback (most recent call last):
  File "/Users/rkm/projects/python/host/lib/python3.13/test/test_optimizer.py", line 52, in test_builtin_dict
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        orig_counter + 1,
        ^^^^^^^^^^^^^^^^^
        _testinternalcapi.get_rare_event_counters()["builtin_dict"]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 256 != 255

test_optimizer failed (1 failure)

== Tests result: FAILURE ==

I've been able to narrow down a minimal reproduction case if you run the following sequence of tests:

python -m test test_fileinput test_funcattrs test_functools test_generators test_genexps test_getopt test_gettext test_optimizer

If you remove any one of the tests before test_optimizer, the test passes.

I'm observing the failure on both x86_64 (Ventura 13.5.2) and M1 (Ventura 13.6.2) hardware.

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS, Other

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixesbugs and security fixestestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.