Author: Maciej Fijalkowski <[email protected]>
Branch: kill-someobject
Changeset: r58026:b078bdbf485e
Date: 2012-10-12 13:37 +0200
http://bitbucket.org/pypy/pypy/changeset/b078bdbf485e/

Log:    fix math

diff --git a/pypy/module/math/test/test_translated.py 
b/pypy/module/math/test/test_translated.py
--- a/pypy/module/math/test/test_translated.py
+++ b/pypy/module/math/test/test_translated.py
@@ -1,10 +1,15 @@
-import py
 from pypy.translator.c.test.test_genc import compile
 from pypy.module.math.interp_math import _gamma
 
 
 def test_gamma_overflow():
-    f = compile(_gamma, [float])
+    def wrapper(arg):
+        try:
+            return _gamma(arg)
+        except OverflowError:
+            return -42
+    
+    f = compile(wrapper, [float])
     assert f(10.0) == 362880.0
-    py.test.raises(OverflowError, f, 1720.0)
-    py.test.raises(OverflowError, f, 172.0)
+    assert f(1720.0) == -42
+    assert f(172.0) == -42
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to