summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_frame.py
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2018-12-17 14:52:45 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2018-12-17 14:52:45 (GMT)
commit842acaab1376c5c84fd5966bb6070e289880e1ca (patch)
treef21283245b7e349d05482b89fde8d570b33c53ab /Lib/test/test_frame.py
parent4db62e115891425db2a974142a72d8eaaf95eecb (diff)
downloadcpython-842acaab1376c5c84fd5966bb6070e289880e1ca.zip
cpython-842acaab1376c5c84fd5966bb6070e289880e1ca.tar.gz
cpython-842acaab1376c5c84fd5966bb6070e289880e1ca.tar.bz2
bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175)
Diffstat (limited to 'Lib/test/test_frame.py')
-rw-r--r--Lib/test/test_frame.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/test/test_frame.py b/Lib/test/test_frame.py
index fd79508..d6aa283 100644
--- a/Lib/test/test_frame.py
+++ b/Lib/test/test_frame.py
@@ -109,10 +109,7 @@ class ClearTest(unittest.TestCase):
self.assertIs(None, wr())
-class FrameLocalsTest(unittest.TestCase):
- """
- Tests for the .f_locals attribute.
- """
+class FrameAttrsTest(unittest.TestCase):
def make_frames(self):
def outer():
@@ -159,6 +156,11 @@ class FrameLocalsTest(unittest.TestCase):
self.assertEqual(outer.f_locals, {})
self.assertEqual(inner.f_locals, {})
+ def test_f_lineno_del_segfault(self):
+ f, _, _ = self.make_frames()
+ with self.assertRaises(AttributeError):
+ del f.f_lineno
+
class ReprTest(unittest.TestCase):
"""