]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-155146: Do not depend on the exact number of allocations in test_class (GH-155150)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 4 Aug 2026 08:49:38 +0000 (11:49 +0300)
committerGitHub <noreply@github.com>
Tue, 4 Aug 2026 08:49:38 +0000 (11:49 +0300)
commit416c3465e247bc5a36f86b832360f65e06a0767a
tree532b13000cf9e83dee879471668bd2c376d05b91
parent089b713e01665c5fec8865a16716d1e4bce7c1d9
gh-155146: Do not depend on the exact number of allocations in test_class (GH-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.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Lib/test/test_class.py