mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +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')
|
||||
self.assertRaises(UnicodeDecodeError, f.read, 2)
|
||||
finally:
|
||||
try: f.close()
|
||||
except: pass
|
||||
os.unlink(TESTFN)
|
||||
|
||||
class Test_StreamWriter(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue