X Tutup
Skip to content

Commit 82b7065

Browse files
authored
Merge pull request #2109 from EliahKagan/312-more-gc
Run `gc.collect()` twice in `test_rename` on Python 3.12
2 parents c0a3d5f + 98b78d2 commit 82b7065

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/test_submodule.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,7 @@ def test_rename(self, rwdir):
10111011
# garbage collector detailed in https://github.com/python/cpython/issues/97922.)
10121012
if sys.platform == "win32" and sys.version_info >= (3, 12):
10131013
gc.collect()
1014+
gc.collect() # Some finalizer scenarios need two collections, at least in theory.
10141015

10151016
new_path = "renamed/myname"
10161017
assert sm.move(new_path).name == new_path

0 commit comments

Comments
 (0)
X Tutup