mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +00:00
Fix asyncore test that fails on pypy by explicitly closing file
This commit is contained in:
parent
533aa25b48
commit
97b68126f2
1 changed files with 2 additions and 1 deletions
|
@ -398,7 +398,8 @@ class DispatcherWithSendTests_UsePoll(DispatcherWithSendTests):
|
||||||
class FileWrapperTest(unittest.TestCase):
|
class FileWrapperTest(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.d = "It's not dead, it's sleeping!"
|
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):
|
def tearDown(self):
|
||||||
unlink(TESTFN)
|
unlink(TESTFN)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue