Skip to content

Commit b892d3e

Browse files
jdemeyerrbtcollins
authored andcommitted
bpo-36994: add test for profiling method_descriptor with **kwargs (GH-13461)
It adds a missing testcase for bpo-34125. This is testing code which is affected by PEP 590, so missing this test might accidentally break CPython if we screw up with implementing PEP 590.
1 parent ef9d9b6 commit b892d3e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Lib/test/test_sys_setprofile.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,15 @@ def j(p):
334334
(1, 'return', j_ident),
335335
])
336336

337+
# bpo-34125: profiling method_descriptor with **kwargs
338+
def test_unbound_method(self):
339+
kwargs = {}
340+
def f(p):
341+
dict.get({}, 42, **kwargs)
342+
f_ident = ident(f)
343+
self.check_events(f, [(1, 'call', f_ident),
344+
(1, 'return', f_ident)])
345+
337346
# Test an invalid call (bpo-34126)
338347
def test_unbound_method_no_args(self):
339348
def f(p):

0 commit comments

Comments
 (0)