Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r49463:d6424b565434
Date: 2011-11-16 12:25 +0100
http://bitbucket.org/pypy/pypy/changeset/d6424b565434/

Log:    Added a failing test.

diff --git a/pypy/module/math/test/test_translated.py 
b/pypy/module/math/test/test_translated.py
new file mode 100644
--- /dev/null
+++ b/pypy/module/math/test/test_translated.py
@@ -0,0 +1,10 @@
+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])
+    assert f(10.0) == 362880.0
+    py.test.raises(OverflowError, f, 1720.0)
+    py.test.raises(OverflowError, f, 172.0)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to