From: Hye-Shik Chang Date: Tue, 5 Jun 2007 19:28:15 +0000 (+0000) Subject: Fix for Windows: close a temporary file before trying to delete it. X-Git-Tag: v2.5.2c1~278 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc41f199bab37eb3ae0a7ce2994e0638b75cbded;p=python Fix for Windows: close a temporary file before trying to delete it. --- diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py index dd933f3463..bee762fbe5 100644 --- a/Lib/test/test_multibytecodec.py +++ b/Lib/test/test_multibytecodec.py @@ -143,6 +143,8 @@ class Test_StreamReader(unittest.TestCase): 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):