Author: Maciej Fijalkowski <[email protected]>
Branch: kill-someobject
Changeset: r58035:66fc020fbd16
Date: 2012-10-12 15:10 +0200
http://bitbucket.org/pypy/pypy/changeset/66fc020fbd16/

Log:    fix tests

diff --git a/pypy/rlib/parsing/test/test_tree.py 
b/pypy/rlib/parsing/test/test_tree.py
--- a/pypy/rlib/parsing/test/test_tree.py
+++ b/pypy/rlib/parsing/test/test_tree.py
@@ -56,9 +56,12 @@
         def foo():
             tree = Nonterminal(symbol="a", 
                 children=[])
-            return tree.getsourcepos()
+            try:
+                return tree.getsourcepos()
+            except IndexError:
+                return -42
         f = self.compile(foo)
-        py.test.raises(IndexError, f)    
+        assert f() == -42
 
     def test_nonterminal_nested_empty(self):
         def foo():
@@ -70,9 +73,12 @@
                 children=[Nonterminal(symbol="c",
                 children=[Nonterminal(symbol="c",
                 children=[])])])])])])])
-            return tree.getsourcepos()
+            try:
+                return tree.getsourcepos()
+            except IndexError:
+                return -42
         f = self.compile(foo)
-        py.test.raises(IndexError, f)    
+        assert f() == -42
 
 
 class TestTreeTranslatedLLType(BaseTestTreeTranslated):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to