SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

72137 0 41 Python

gh-119584: Fix test_import Failed Assertion (gh-119623)

The fix in gh-119561 introduced an assertion that doesn't hold true if any of the three new test extension modules are loaded more than once.  This is fine normally but breaks if the new test_check_state_first() is run more than once, which happens for refleak checking and with the regrtest --forever flag.  We fix that here by clearing each of the three modules after loading them.  We also tweak a check in _modules_by_index_check().
E
Eric Snow committed
ae7b17673f29efe17b416cbcfbf43b5b3ff5977c
Parent: 0bd0d40
Committed by GitHub <noreply@github.com> on 5/27/2024, 7:35:30 PM