Skip to content

Commit a228887

Browse files
committed
https://en.wikipedia.org/wiki/Memory_leak#Pseudocode
1 parent 78eb704 commit a228887

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_os.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2531,13 +2531,13 @@ def test_closerange(self):
25312531
break
25322532
else:
25332533
copies.append(file_dup)
2534-
if i < 2:
2535-
raise unittest.SkipTest(
2536-
"Unable to acquire a range of invalid file descriptors")
25372534
# Close everything
25382535
for copy in copies:
25392536
copy.close()
25402537
os.unlink(os_helper.TESTFN)
2538+
if i < 2:
2539+
raise unittest.SkipTest(
2540+
"Unable to acquire a range of invalid file descriptors")
25412541

25422542
# Now we're left with invalid FDs. Let's go close them!
25432543
self.assertEqual(os.closerange(fd, fd + i-1), None)

0 commit comments

Comments
 (0)