mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Fix for Windows: close a temporary file before trying to delete it.
This commit is contained in:
parent
9b5414090b
commit
f9a0ea8ce1
1 changed files with 2 additions and 0 deletions
|
@ -143,6 +143,8 @@ class Test_StreamReader(unittest.TestCase):
|
||||||
f = codecs.open(TESTFN, encoding='cp949')
|
f = codecs.open(TESTFN, encoding='cp949')
|
||||||
self.assertRaises(UnicodeDecodeError, f.read, 2)
|
self.assertRaises(UnicodeDecodeError, f.read, 2)
|
||||||
finally:
|
finally:
|
||||||
|
try: f.close()
|
||||||
|
except: pass
|
||||||
os.unlink(TESTFN)
|
os.unlink(TESTFN)
|
||||||
|
|
||||||
class Test_StreamWriter(unittest.TestCase):
|
class Test_StreamWriter(unittest.TestCase):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue