Commit ae7b176
authored
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().
1 parent 0bd0d40 commit ae7b176
File tree
3 files changed
+8
-2
lines changed- Lib/test/test_import
- Modules
- Python
3 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2887 | 2887 | | |
2888 | 2888 | | |
2889 | 2889 | | |
| 2890 | + | |
2890 | 2891 | | |
2891 | 2892 | | |
2892 | 2893 | | |
2893 | 2894 | | |
2894 | 2895 | | |
2895 | 2896 | | |
| 2897 | + | |
| 2898 | + | |
2896 | 2899 | | |
2897 | 2900 | | |
2898 | 2901 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
685 | 688 | | |
686 | 689 | | |
687 | 690 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
| 497 | + | |
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
| |||
2183 | 2183 | | |
2184 | 2184 | | |
2185 | 2185 | | |
2186 | | - | |
| 2186 | + | |
2187 | 2187 | | |
2188 | 2188 | | |
2189 | 2189 | | |
| |||
0 commit comments