mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #23696: Remove test on ZipImportError.__context__ because the context is
None on Windows. When the file is not readable, the error occurs at open on UNIX. On Windows, the error only occurs at the first operation on the open file. It would require to many changes to set __context__ to an OSError for all file operations, for a little benefit (__context__ is almost never used).
This commit is contained in:
parent
03129230c9
commit
57d516bd6b
1 changed files with 0 additions and 1 deletions
|
@ -453,7 +453,6 @@ class BadFileZipImportTestCase(unittest.TestCase):
|
|||
|
||||
with self.assertRaises(zipimport.ZipImportError) as cm:
|
||||
zipimport.zipimporter(TESTMOD)
|
||||
self.assertIsInstance(cm.exception.__context__, PermissionError)
|
||||
finally:
|
||||
# If we leave "the read-only bit" set on Windows, nothing can
|
||||
# delete TESTMOD, and later tests suffer bogus failures.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue