mirror of https://github.com/python/cpython
Fix for Windows: close a temporary file before trying to delete it.
This commit is contained in:
parent
9b5414090b
commit
f9a0ea8ce1
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue