[pypy-svn] pypy fast-forward: Fix test.

arigo commits-noreply at bitbucket.org
Sun Jan 16 12:15:59 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: fast-forward
Changeset: r40709:9ca8158ce123
Date: 2011-01-16 12:15 +0100
http://bitbucket.org/pypy/pypy/changeset/9ca8158ce123/

Log:	Fix test.

diff --git a/pypy/translator/c/test/test_math.py b/pypy/translator/c/test/test_math.py
--- a/pypy/translator/c/test/test_math.py
+++ b/pypy/translator/c/test/test_math.py
@@ -1,10 +1,14 @@
 import py, math
 from pypy.module.math.test import test_direct
 from pypy.translator.c.test.test_standalone import StandaloneTests
+from pypy.rlib import rarithmetic
 
 
 def get_test_case((fnname, args, expected)):
-    fn = getattr(math, fnname)
+    try:
+        fn = getattr(math, fnname)
+    except AttributeError:
+        fn = getattr(rarithmetic, fnname)
     expect_valueerror = (expected == ValueError)
     expect_overflowerror = (expected == OverflowError)
     check = test_direct.get_tester(expected)


More information about the Pypy-commit mailing list