Fix for Windows: close a temporary file before trying to delete it.

This commit is contained in:
Hye-Shik Chang 2007-06-05 19:28:15 +00:00
parent 9b5414090b
commit f9a0ea8ce1
1 changed files with 2 additions and 0 deletions

View File

@ -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):