Skip to content

Enable missing TestJsonEncoding tests - #158668

Open
hugovk wants to merge 1 commit into
python:mainfrom
hugovk:3.16-enable-missed-tests
Open

hugovk wants to merge 1 commit into
python:mainfrom
hugovk:3.16-enable-missed-tests

Conversation

@hugovk

@hugovk hugovk commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

The threading_helper.reap_threads decorator is intended for test functions, not classes, and applying it to the class means it didn't run:

0:10:15 load avg: 11.08 mem: 230.8 MiB [394/558/1] test.test_free_threading.test_json ran no tests

https://github.com/python/cpython/actions/runs/37135589260/job/111239394429#step:19:2263

Removing it allows the tests to run:

0:06:14 load avg: 9.65 mem: 308.6 MiB [349/558] test.test_free_threading.test_json passed -- running (2): test_zipfile (34.5 sec), test_regrtest (1 min 19 sec)

https://github.com/hugovk/cpython/actions/runs/37135650674/job/111251480717#step:19:391

This wasn't visible before #158620 (except for occasional re-runs).

Originally added in #119438, cc @eendebakpt.

@hugovk hugovk added the tests Tests in the Lib/test dir label Oct 3, 2026
@hugovk hugovk added needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip issue skip news labels Oct 3, 2026
@vstinner

vstinner commented Oct 6, 2026

Copy link
Copy Markdown
Member

Hi. I also discovered this issue and I wrote PR #158937 to fix it. @StanFromIreland told me that @hugovk already wrote this fix.

My PR moves @reap_threads on each test method rather than removing it, and it also adds a check to @reap_threads to detect misusage of the decorator (fails if the argument is a class).

Would you mind to review my change? #158937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip issue skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants