From f9a0ea8ce1b7907c2f3073be0539d0a0b067a8fa Mon Sep 17 00:00:00 2001 From: Hye-Shik Chang Date: Tue, 5 Jun 2007 19:28:15 +0000 Subject: [PATCH] Fix for Windows: close a temporary file before trying to delete it. --- Lib/test/test_multibytecodec.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py index b6557f3d98a..f2b042cc7ce 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):