Fix asyncore test that fails on pypy by explicitly closing file

This commit is contained in:
Michael Foord 2011-01-16 13:03:37 +00:00
parent 533aa25b48
commit 97b68126f2
1 changed files with 2 additions and 1 deletions

View File

@ -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)