Skip to content

[3.15] gh-155146: Do not depend on the exact number of allocations in test_class (GH-155150) - #155155

Open
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-416c346-3.15
Open

[3.15] gh-155146: Do not depend on the exact number of allocations in test_class (GH-155150)#155155
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-416c346-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Try to fail every one of the first allocations and accept the first one which
fails in the code detaching the instance dictionary from the object, instead
of assuming that this is the first allocation after set_nomemory().

Run the test with the test.support.isolation.runInSubprocess() decorator
instead of executing it as a source string in a subprocess.
(cherry picked from commit 416c346)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 5 (1M context) noreply@anthropic.com

…test_class (pythonGH-155150)

Try to fail every one of the first allocations and accept the first one which
fails in the code detaching the instance dictionary from the object, instead
of assuming that this is the first allocation after set_nomemory().

Run the test with the test.support.isolation.runInSubprocess() decorator
instead of executing it as a source string in a subprocess.
(cherry picked from commit 416c346)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants