diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-04-11 13:53:35 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-04-11 13:53:35 (GMT) |
commit | ceccc3c0376671ee1da9714bbe15d1fae436c66c (patch) | |
tree | 85724db04a7e49d4cf0b9249d13f9690b9b8ce83 /Lib/test/test_extcall.py | |
parent | 512a237725c728faf495608c650f405522c3c5d4 (diff) | |
download | cpython-ceccc3c0376671ee1da9714bbe15d1fae436c66c.zip cpython-ceccc3c0376671ee1da9714bbe15d1fae436c66c.tar.gz cpython-ceccc3c0376671ee1da9714bbe15d1fae436c66c.tar.bz2 |
Test cases for examples of ext call error handling.
Fix to SF bug #414743 based on Michael Hudson's patch #414750.
Diffstat (limited to 'Lib/test/test_extcall.py')
-rw-r--r-- | Lib/test/test_extcall.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py index 9e6da62..4720901 100644 --- a/Lib/test/test_extcall.py +++ b/Lib/test/test_extcall.py @@ -138,12 +138,47 @@ else: print "should raise TypeError: * argument must be a tuple" try: + dir(*h) +except TypeError, err: + print err +else: + print "should raise TypeError: * argument must be a tuple" + +try: + None(*h) +except TypeError, err: + print err +else: + print "should raise TypeError: * argument must be a tuple" + +try: h(**h) except TypeError, err: print err else: print "should raise TypeError: ** argument must be a dictionary" +try: + dir(**h) +except TypeError, err: + print err +else: + print "should raise TypeError: ** argument must be a dictionary" + +try: + None(**h) +except TypeError, err: + print err +else: + print "should raise TypeError: ** argument must be a dictionary" + +try: + dir(b=1,**{'b':1}) +except TypeError, err: + print err +else: + print "should raise TypeError: dir() got multiple values for keyword argument 'b'" + def f2(*a, **b): return a, b |