[Python-checkins] r55775 - in python: branches/release24-maint/Lib/test/test_multibytecodec.py branches/release25-maint/Lib/test/test_multibytecodec.py trunk/Lib/test/test_multibytecodec.py
hyeshik.chang
python-checkins at python.org
Tue Jun 5 21:28:22 CEST 2007
Author: hyeshik.chang
Date: Tue Jun 5 21:28:15 2007
New Revision: 55775
Modified:
python/branches/release24-maint/Lib/test/test_multibytecodec.py
python/branches/release25-maint/Lib/test/test_multibytecodec.py
python/trunk/Lib/test/test_multibytecodec.py
Log:
Fix for Windows: close a temporary file before trying to delete it.
Modified: python/branches/release24-maint/Lib/test/test_multibytecodec.py
==============================================================================
--- python/branches/release24-maint/Lib/test/test_multibytecodec.py (original)
+++ python/branches/release24-maint/Lib/test/test_multibytecodec.py Tue Jun 5 21:28:15 2007
@@ -17,6 +17,8 @@
f = codecs.open(TESTFN, encoding='cp949')
self.assertRaises(UnicodeDecodeError, f.read, 2)
finally:
+ try: f.close()
+ except: pass
os.unlink(TESTFN)
class Test_StreamWriter(unittest.TestCase):
Modified: python/branches/release25-maint/Lib/test/test_multibytecodec.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_multibytecodec.py (original)
+++ python/branches/release25-maint/Lib/test/test_multibytecodec.py Tue Jun 5 21:28:15 2007
@@ -143,6 +143,8 @@
f = codecs.open(TESTFN, encoding='cp949')
self.assertRaises(UnicodeDecodeError, f.read, 2)
finally:
+ try: f.close()
+ except: pass
os.unlink(TESTFN)
class Test_StreamWriter(unittest.TestCase):
Modified: python/trunk/Lib/test/test_multibytecodec.py
==============================================================================
--- python/trunk/Lib/test/test_multibytecodec.py (original)
+++ python/trunk/Lib/test/test_multibytecodec.py Tue Jun 5 21:28:15 2007
@@ -143,6 +143,8 @@
f = codecs.open(TESTFN, encoding='cp949')
self.assertRaises(UnicodeDecodeError, f.read, 2)
finally:
+ try: f.close()
+ except: pass
os.unlink(TESTFN)
class Test_StreamWriter(unittest.TestCase):
More information about the Python-checkins
mailing list