[Python-checkins] r88046 - python/branches/release27-maint/Lib/test/test_asyncore.py
michael.foord
python-checkins at python.org
Sun Jan 16 14:03:37 CET 2011
Author: michael.foord
Date: Sun Jan 16 14:03:37 2011
New Revision: 88046
Log:
Fix asyncore test that fails on pypy by explicitly closing file
Modified:
python/branches/release27-maint/Lib/test/test_asyncore.py
Modified: python/branches/release27-maint/Lib/test/test_asyncore.py
==============================================================================
--- python/branches/release27-maint/Lib/test/test_asyncore.py (original)
+++ python/branches/release27-maint/Lib/test/test_asyncore.py Sun Jan 16 14:03:37 2011
@@ -398,7 +398,8 @@
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)
More information about the Python-checkins
mailing list