summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncore.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncore.py')
-rw-r--r--Lib/test/test_asyncore.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py
index 6217334..d5e6fa3 100644
--- a/Lib/test/test_asyncore.py
+++ b/Lib/test/test_asyncore.py
@@ -398,7 +398,8 @@ class DispatcherWithSendTests_UsePoll(DispatcherWithSendTests):
class FileWrapperTest(unittest.TestCase):
def setUp(self):
self.d = "It's not dead, it's sleeping!"
- file(TESTFN, 'w').write(self.d)
+ with file(TESTFN, 'w') as h:
+ h.write(self.d)
def tearDown(self):
unlink(TESTFN)