Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r50874:c9706c6e6914 Date: 2011-12-26 15:22 +0100 http://bitbucket.org/pypy/pypy/changeset/c9706c6e6914/
Log: A failing test. diff --git a/pypy/rpython/test/test_generator.py b/pypy/rpython/test/test_generator.py --- a/pypy/rpython/test/test_generator.py +++ b/pypy/rpython/test/test_generator.py @@ -54,6 +54,26 @@ res = self.interpret(f, [0]) assert res == 42 + def test_except_block(self): + def foo(): + raise ValueError + def g(a, b, c): + yield a + yield b + try: + foo() + except ValueError: + pass + yield c + def f(): + gen = g(3, 5, 8) + x = gen.next() * 100 + x += gen.next() * 10 + x += gen.next() + return x + res = self.interpret(f, []) + assert res == 358 + class TestLLtype(BaseTestGenerator, LLRtypeMixin): pass _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit