diff options
author | Michael Foord <fuzzyman@voidspace.org.uk> | 2011-01-16 13:03:37 (GMT) |
---|---|---|
committer | Michael Foord <fuzzyman@voidspace.org.uk> | 2011-01-16 13:03:37 (GMT) |
commit | 97b68126f271f9bed7e90ab54446054e5c86ced5 (patch) | |
tree | bc74b1a97306da019908c81d499e117e7b4c53b1 | |
parent | 533aa25b4840bcfb0e119e7c73d66b7dc2e2b255 (diff) | |
download | cpython-97b68126f271f9bed7e90ab54446054e5c86ced5.zip cpython-97b68126f271f9bed7e90ab54446054e5c86ced5.tar.gz cpython-97b68126f271f9bed7e90ab54446054e5c86ced5.tar.bz2 |
Fix asyncore test that fails on pypy by explicitly closing file
-rw-r--r-- | Lib/test/test_asyncore.py | 3 |
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) |