cpython/Lib/test/test_import
Miss Islington (bot) 660125f864
[3.13] gh-119584: Fix test_import Failed Assertion (gh-119623) (gh-119633)
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().

(cherry picked from commit ae7b17673f)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-05-27 20:04:13 +00:00
..
data gh-117860: Add tests for resolving names when import rebind names (GH-118176) 2024-04-30 17:23:44 +03:00
__init__.py [3.13] gh-119584: Fix test_import Failed Assertion (gh-119623) (gh-119633) 2024-05-27 20:04:13 +00:00
__main__.py