diff --git a/tests/45_yield.py b/tests/45_yield.py index 65430e33..40e3cdcc 100644 --- a/tests/45_yield.py +++ b/tests/45_yield.py @@ -36,4 +36,13 @@ def f(): yield from g() a = [i for i in f()] -assert a == [1, 2, 3] \ No newline at end of file +assert a == [1, 2, 3] + +def f(n): + for i in range(n): + yield i + for j in range(i): + yield j + +t = f(3) +assert list(t) == [0, 1, 0, 2, 0, 1] \ No newline at end of file