projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c4d20b
)
extended test case
author
Stefan Behnel
<scoder@users.berlios.de>
Tue, 14 Dec 2010 06:15:07 +0000
(07:15 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Tue, 14 Dec 2010 06:15:07 +0000
(07:15 +0100)
tests/run/generators.pyx
patch
|
blob
|
history
diff --git
a/tests/run/generators.pyx
b/tests/run/generators.pyx
index de15c1adfbfd5a8ca94dca90bf3a2f44251d05fa..f2243afc994bf2cce9acacabcc047fe8dc809acd 100644
(file)
--- 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):
"""