mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
#4764 in io.open, set IOError.filename when trying to open a directory on POSIX platforms
This commit is contained in:
parent
fe231b07e4
commit
7af65568ff
3 changed files with 8 additions and 4 deletions
|
@ -109,6 +109,7 @@ class AutoFileTests(unittest.TestCase):
|
|||
_fileio._FileIO('.', 'r')
|
||||
except IOError as e:
|
||||
self.assertNotEqual(e.errno, 0)
|
||||
self.assertEqual(e.filename, ".")
|
||||
else:
|
||||
self.fail("Should have raised IOError")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue