From ac90ca8c54804c364237ae441a26717c21704530 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 052f1681ddae..ff88dbabf5cf 100644 --- a/Lib/test/test_multibytecodec.py +++ b/Lib/test/test_multibytecodec.py @@ -17,6 +17,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): -- 2.47.3