From 21d0f992fcdcd0c5f747595b3f09df5a46001576 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 14 Dec 2010 07:15:07 +0100 Subject: [PATCH] extended test case --- tests/run/generators.pyx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/run/generators.pyx b/tests/run/generators.pyx index de15c1ad..f2243afc 100644 --- a/tests/run/generators.pyx +++ b/tests/run/generators.pyx @@ -164,6 +164,19 @@ def test_first_assignment(): yield y yield (x,y) +def test_swap_assignment(): + """ + >>> gen = test_swap_assignment() + >>> next(gen) + (5, 10) + >>> next(gen) + (10, 5) + """ + x,y = 5,10 + yield (x,y) + x,y = y,x # no ref-counting here + yield (x,y) + class Foo(object): """ -- 2.26.2