diff options
Diffstat (limited to 'Lib/test/test_extcall.py')
-rw-r--r-- | Lib/test/test_extcall.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py index 043df01311..2c1848337b 100644 --- a/Lib/test/test_extcall.py +++ b/Lib/test/test_extcall.py @@ -163,6 +163,10 @@ right error message? (Also check with other iterables.) Traceback (most recent call last): ... TypeError: myerror + >>> g(*range(1), *(broken() for i in range(1))) + Traceback (most recent call last): + ... + TypeError: myerror >>> class BrokenIterable1: ... def __iter__(self): @@ -172,6 +176,10 @@ right error message? (Also check with other iterables.) Traceback (most recent call last): ... TypeError: myerror + >>> g(*range(1), *BrokenIterable1()) + Traceback (most recent call last): + ... + TypeError: myerror >>> class BrokenIterable2: ... def __iter__(self): @@ -182,6 +190,10 @@ right error message? (Also check with other iterables.) Traceback (most recent call last): ... TypeError: myerror + >>> g(*range(1), *BrokenIterable2()) + Traceback (most recent call last): + ... + TypeError: myerror >>> class BrokenSequence: ... def __getitem__(self, idx): @@ -191,6 +203,10 @@ right error message? (Also check with other iterables.) Traceback (most recent call last): ... TypeError: myerror + >>> g(*range(1), *BrokenSequence()) + Traceback (most recent call last): + ... + TypeError: myerror Make sure that the function doesn't stomp the dictionary |