Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions tests/suite/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,20 +502,6 @@ def return_fd2():
f.close()
self.assertRaises(OSError, os.fdopen, fd)

def test_file_manager_leak(self):
# the number of iterations should be larger than Microsoft.Scripting.Utils.HybridMapping.SIZE (currently 4K)
N = 5000
for i in range(N):
fd = os.open(self.temp_file, os.O_WRONLY | os.O_CREAT | os.O_TRUNC)
f = os.fdopen(fd, 'w', closefd=True)
f.close()

for i in range(N):
fd = os.open(self.temp_file, os.O_WRONLY | os.O_CREAT | os.O_TRUNC)
f = os.fdopen(fd, 'w', closefd=False)
g = os.fdopen(f.fileno(), 'w', closefd=True)
g.close()

def test_sharing(self):
modes = ['w', 'w+', 'a+', 'r', 'w']
fname = self.temp_file
Expand Down