diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-12-17 14:43:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-17 14:43:14 (GMT) |
commit | e2af34fcf84b41189b54e1f2912faded5daabaca (patch) | |
tree | 14ddbfbc1b3ba0cac52df2889140f81adf98758c /Lib/test | |
parent | fae95874b729dfe62a7a40625f8717aed20b0fca (diff) | |
download | cpython-e2af34fcf84b41189b54e1f2912faded5daabaca.zip cpython-e2af34fcf84b41189b54e1f2912faded5daabaca.tar.gz cpython-e2af34fcf84b41189b54e1f2912faded5daabaca.tar.bz2 |
bpo-35504: Fix a SystemError when delete the characters_written attribute of an OSError. (GH-11172)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_exception_hierarchy.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_exception_hierarchy.py b/Lib/test/test_exception_hierarchy.py index 8649596..43b4af8 100644 --- a/Lib/test/test_exception_hierarchy.py +++ b/Lib/test/test_exception_hierarchy.py @@ -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): |