diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/basics/generator_return.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/basics/generator_return.py b/tests/basics/generator_return.py index 5814ce837..2b3464a02 100644 --- a/tests/basics/generator_return.py +++ b/tests/basics/generator_return.py @@ -8,3 +8,9 @@ try: print(next(g)) except StopIteration as e: print(type(e), e.args) + +# trying next again should raise StopIteration with no arguments +try: + print(next(g)) +except StopIteration as e: + print(type(e), e.args) |
