summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2018-12-20 17:38:52 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2018-12-20 17:38:52 (GMT)
commitf347c6eb75ca46990cd7ad3efbe02002603d8460 (patch)
tree744adc5ac41e122e2084d8214cafb4fbc22be2b3 /Lib/test/test_io.py
parent3752bc96c0ea1ecf28903cc34cdcd75c658e92ce (diff)
downloadcpython-f347c6eb75ca46990cd7ad3efbe02002603d8460.zip
cpython-f347c6eb75ca46990cd7ad3efbe02002603d8460.tar.gz
cpython-f347c6eb75ca46990cd7ad3efbe02002603d8460.tar.bz2
bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175) (GH-11249)
(cherry picked from commit 842acaab1376c5c84fd5966bb6070e289880e1ca)
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r--Lib/test/test_io.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 8152e61..5ec0b7b 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -2807,6 +2807,11 @@ class CTextIOWrapperTest(TextIOWrapperTest):
t2.buddy = t1
support.gc_collect()
+ def test_del__CHUNK_SIZE_SystemError(self):
+ t = self.TextIOWrapper(self.BytesIO(), encoding='ascii')
+ with self.assertRaises(AttributeError):
+ del t._CHUNK_SIZE
+
maybeRaises = unittest.TestCase.assertRaises