[pypy-commit] pypy py3k: Added an explicit test for log1p using negative values.

prestontimmons noreply at buildbot.pypy.org
Wed Mar 14 19:34:47 CET 2012


Author: Preston Timmons <prestontimmons at gmail.com>
Branch: py3k
Changeset: r53574:a2bb9ecd710b
Date: 2012-03-13 20:03 +0000
http://bitbucket.org/pypy/pypy/changeset/a2bb9ecd710b/

Log:	Added an explicit test for log1p using negative values.

diff --git a/pypy/module/math/test/test_math.py b/pypy/module/math/test/test_math.py
--- a/pypy/module/math/test/test_math.py
+++ b/pypy/module/math/test/test_math.py
@@ -104,6 +104,8 @@
         self.ftest(math.log1p(0), 0)
         self.ftest(math.log1p(math.e-1), 1)
         self.ftest(math.log1p(1), math.log(2))
+        raises(ValueError, math.log1p, -1)
+        raises(ValueError, math.log1p, -100)
 
     def test_acosh(self):
         import math


More information about the pypy-commit mailing list