mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
bpo-35504: Fix a SystemError when delete the characters_written attribute of an OSError. (GH-11172)
This commit is contained in:
parent
fae95874b7
commit
e2af34fcf8
3 changed files with 14 additions and 0 deletions
|
@ -150,10 +150,15 @@ class AttributesTest(unittest.TestCase):
|
|||
e = BlockingIOError(*args[:n])
|
||||
with self.assertRaises(AttributeError):
|
||||
e.characters_written
|
||||
with self.assertRaises(AttributeError):
|
||||
del e.characters_written
|
||||
e = BlockingIOError("a", "b", 3)
|
||||
self.assertEqual(e.characters_written, 3)
|
||||
e.characters_written = 5
|
||||
self.assertEqual(e.characters_written, 5)
|
||||
del e.characters_written
|
||||
with self.assertRaises(AttributeError):
|
||||
e.characters_written
|
||||
|
||||
|
||||
class ExplicitSubclassingTest(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue