mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
inspect: Fix getcallargs() to fail correctly if more than 3 args are missing.
Patch by Jeremiah Lowin. Closes #20817.
This commit is contained in:
parent
875df20e8a
commit
dccfa13cdb
3 changed files with 10 additions and 1 deletions
|
@ -1216,6 +1216,12 @@ class TestGetcallargsFunctions(unittest.TestCase):
|
|||
inspect.getcallargs(f5)
|
||||
|
||||
|
||||
# issue20817:
|
||||
def f6(a, b, c):
|
||||
pass
|
||||
with self.assertRaisesRegex(TypeError, "'a', 'b' and 'c'"):
|
||||
inspect.getcallargs(f6)
|
||||
|
||||
class TestGetcallargsMethods(TestGetcallargsFunctions):
|
||||
|
||||
def setUp(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue