[pypy-svn] pypy fast-forward: Fix test_direct.
arigo
commits-noreply at bitbucket.org
Sun Jan 9 11:44:19 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: fast-forward
Changeset: r40507:77b4c3189863
Date: 2011-01-09 11:24 +0100
http://bitbucket.org/pypy/pypy/changeset/77b4c3189863/
Log: Fix test_direct.
diff --git a/pypy/module/math/test/test_direct.py b/pypy/module/math/test/test_direct.py
--- a/pypy/module/math/test/test_direct.py
+++ b/pypy/module/math/test/test_direct.py
@@ -2,6 +2,7 @@
"""
import py, sys, math
+from pypy.rlib import rarithmetic
from pypy.rlib.rarithmetic import isinf, isnan, INFINITY, NAN
consistent_host = True
@@ -223,7 +224,10 @@
def test_func(self):
if not consistent_host:
py.test.skip("inconsistent behavior before 2.6")
- fn = getattr(math, fnname)
+ try:
+ fn = getattr(math, fnname)
+ except AttributeError:
+ fn = getattr(rarithmetic, fnname)
do_test(fn, fnname, args, expected)
#
dict[fnname] = dict.get(fnname, 0) + 1
More information about the Pypy-commit
mailing list