[pypy-svn] r56422 - pypy/branch/2.5-features/pypy/interpreter/test
bgola at codespeak.net
bgola at codespeak.net
Thu Jul 10 17:07:28 CEST 2008
Author: bgola
Date: Thu Jul 10 17:07:28 2008
New Revision: 56422
Modified:
pypy/branch/2.5-features/pypy/interpreter/test/test_generator.py
Log:
new test for generators
Modified: pypy/branch/2.5-features/pypy/interpreter/test/test_generator.py
==============================================================================
--- pypy/branch/2.5-features/pypy/interpreter/test/test_generator.py (original)
+++ pypy/branch/2.5-features/pypy/interpreter/test/test_generator.py Thu Jul 10 17:07:28 2008
@@ -34,6 +34,12 @@
g.next()
assert g.send(42) == 42
+ def test_generator_raises_typeerror(self):
+ def f():
+ yield 1
+ g = f()
+ raises(TypeError, g.send, 1)
+
def test_generator_explicit_stopiteration(self):
def f():
yield 1
More information about the Pypy-commit
mailing list