[pypy-commit] pypy default: Added a failing test.

arigo noreply at buildbot.pypy.org
Wed Nov 16 12:29:03 CET 2011


Author: Armin Rigo <arigo at 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)


More information about the pypy-commit mailing list