Skip to content

Commit 78897e7

Browse files
committed
addCleanup to outside of the mofidy_file()
1 parent f66a050 commit 78897e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_threading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,8 +1345,8 @@ def modify_file():
13451345
with open(os_helper.TESTFN, 'w', encoding='utf-8') as fp:
13461346
fp.write(' ')
13471347
traceback.format_stack()
1348-
self.addCleanup(os_helper.unlink, os_helper.TESTFN)
13491348

1349+
self.addCleanup(os_helper.unlink, os_helper.TESTFN)
13501350
threads = [
13511351
threading.Thread(target=modify_file)
13521352
for i in range(100)

0 commit comments

Comments
 (0)