diff options
author | Jeroen Demeyer <J.Demeyer@UGent.be> | 2019-05-22 10:05:02 (GMT) |
---|---|---|
committer | Robert Collins <robertc@robertcollins.net> | 2019-05-22 10:05:02 (GMT) |
commit | b892d3ea468101d35e2fb081002fa693bd86eca9 (patch) | |
tree | 686af436fab98b4367664005e1b24cd58a9a8de0 | |
parent | ef9d9b63129a2f243591db70e9a2dd53fab95d86 (diff) | |
download | cpython-b892d3ea468101d35e2fb081002fa693bd86eca9.zip cpython-b892d3ea468101d35e2fb081002fa693bd86eca9.tar.gz cpython-b892d3ea468101d35e2fb081002fa693bd86eca9.tar.bz2 |
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.
-rw-r--r-- | Lib/test/test_sys_setprofile.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_sys_setprofile.py b/Lib/test/test_sys_setprofile.py index b64bcbc..21a09b5 100644 --- a/Lib/test/test_sys_setprofile.py +++ b/Lib/test/test_sys_setprofile.py @@ -334,6 +334,15 @@ class ProfileSimulatorTestCase(TestCaseBase): (1, 'return', j_ident), ]) + # bpo-34125: profiling method_descriptor with **kwargs + def test_unbound_method(self): + kwargs = {} + def f(p): + dict.get({}, 42, **kwargs) + f_ident = ident(f) + self.check_events(f, [(1, 'call', f_ident), + (1, 'return', f_ident)]) + # Test an invalid call (bpo-34126) def test_unbound_method_no_args(self): def f(p): |