]> granicus.if.org Git - python/commitdiff
Report additional diagnostic information in
authorMark Dickinson <dickinsm@gmail.com>
Sun, 20 Apr 2008 01:22:30 +0000 (01:22 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sun, 20 Apr 2008 01:22:30 +0000 (01:22 +0000)
test_math, to help track down debian-alpha
buildbot failure.

Lib/test/test_math.py

index 0d35130e604d34ecad13c0b95b44cf392a757b6b..4a54a6ed9ed3360a599182e31b202a270e8ee4f2 100644 (file)
@@ -672,7 +672,12 @@ class MathTests(unittest.TestCase):
                 # no real versions of rect, polar
                 continue
             func = getattr(math, fn)
-            result = func(ar)
+            try:
+                result = func(ar)
+            except ValueError:
+                message = ("Unexpected ValueError in " +
+                           "test %s:%s(%r)\n" % (id, fn, ar))
+                self.fail(message)
             self.ftest("%s:%s(%r)" % (id, fn, ar), result, er)
 
 def test_main():