diff options
| author | Damien George <damien.p.george@gmail.com> | 2018-09-27 15:18:24 +1000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-09-27 15:18:24 +1000 |
| commit | fc1bb51af57d8f01db4b6be231fd851b2016919a (patch) | |
| tree | 2bb3b6715ccd5177c09c1ecef3beea54b13394c5 /tests/basics | |
| parent | 6d20be31aee832017982faeb2c349f65030ddd27 (diff) | |
py/objgenerator: Remove TODO about returning gen being called again.
The code implements correct behaviour, as tested by the new test case added
in this commit.
Diffstat (limited to 'tests/basics')
| -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) |
