aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_sys_settrace.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-01-10 12:29:02 +0000
committerGitHub <noreply@github.com>2022-01-10 12:29:02 +0000
commitec0c392f34ee2474ceacf66881f05546b540e2d1 (patch)
tree87d581e50d8dbd021f4399829bec1915e08ad1bc /Lib/test/test_sys_settrace.py
parentd24cd49acb25c36db31893b84d0ca4fe2f373b94 (diff)
downloadcpython-ec0c392f34ee2474ceacf66881f05546b540e2d1.tar.gz
cpython-ec0c392f34ee2474ceacf66881f05546b540e2d1.zip
bpo-46314: Remove extra RESUME when compiling a lamdba. (GH-30513)
Diffstat (limited to 'Lib/test/test_sys_settrace.py')
-rw-r--r--Lib/test/test_sys_settrace.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py
index dc2aef1545b..8e430f72f63 100644
--- a/Lib/test/test_sys_settrace.py
+++ b/Lib/test/test_sys_settrace.py
@@ -1388,6 +1388,21 @@ class TraceTestCase(unittest.TestCase):
(19, 'line'),
(19, 'return')])
+ def test_notrace_lambda(self):
+ #Regression test for issue 46314
+
+ def func():
+ 1
+ lambda x: 2
+ 3
+
+ self.run_and_compare(func,
+ [(0, 'call'),
+ (1, 'line'),
+ (2, 'line'),
+ (3, 'line'),
+ (3, 'return')])
+
class SkipLineEventsTraceTestCase(TraceTestCase):
"""Repeat the trace tests, but with per-line events skipped"""