Closed
Description
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
Labels
bugs and security fixesbugs and security fixesTests in the Lib/test dirTests in the Lib/test dirAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error