File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,8 +27,5 @@ def test_exc(code, exc):
2727# function with keyword args given extra keyword args
2828test_exc ("[].sort(noexist=1)" , TypeError )
2929
30- # function with keyword args not given a specific keyword arg
31- test_exc ("enumerate()" , TypeError )
32-
3330# kw given for positional, but a different positional is missing
3431test_exc ("def f(x, y): pass\n f(x=1)" , TypeError )
Original file line number Diff line number Diff line change 1+ # test errors from bad function calls
2+ try :
3+ enumerate
4+ except :
5+ print ("SKIP" )
6+ import sys
7+ sys .exit ()
8+
9+ def test_exc (code , exc ):
10+ try :
11+ exec (code )
12+ print ("no exception" )
13+ except exc :
14+ print ("right exception" )
15+ except :
16+ print ("wrong exception" )
17+
18+ # function with keyword args not given a specific keyword arg
19+ test_exc ("enumerate()" , TypeError )
You can’t perform that action at this time.
0 commit comments