summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_inspect.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2014-03-27 22:42:52 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2014-03-27 22:42:52 (GMT)
commitdccfa13cdbdb618da3f45f1023c6626be6abb056 (patch)
treed71574745b39ffd6efaad082db7c3ff8c5a619b5 /Lib/test/test_inspect.py
parent875df20e8a2a9bad07a42f0175be019d915e0845 (diff)
downloadcpython-dccfa13cdbdb618da3f45f1023c6626be6abb056.zip
cpython-dccfa13cdbdb618da3f45f1023c6626be6abb056.tar.gz
cpython-dccfa13cdbdb618da3f45f1023c6626be6abb056.tar.bz2
inspect: Fix getcallargs() to fail correctly if more than 3 args are missing.
Patch by Jeremiah Lowin. Closes #20817.
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r--Lib/test/test_inspect.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index b943530..881ca95 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -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):