Read about our upcoming Code of Conduct on this issue

Commit 1690ebd8 authored by Alex Gaynor's avatar Alex Gaynor
Browse files

Use absolute imports, and add back a test that was lost.

parent 3468fc4c3e4a
# this registry uses the new interface for external functions
from extfunc import register_external
from pypy.rpython.extfunc import register_external
# ___________________________
# math functions
......
......@@ -38,21 +38,21 @@ class TestMath(BaseRtypingTest, LLRtypeMixin):
return getattr(math, name)(x, y)
assert self.interpret(f, [0.3, 0.4]) == f(0.3, 0.4)
return next_test
for name in ll_math.unary_math_functions:
for name in ll_math.unary_math_functions + ['sqrt']:
func_name = 'test_%s' % (name,)
next_test = new_unary_test(name)
next_test.func_name = func_name
locals()[func_name] = next_test
del next_test
for name in ['atan2', 'fmod', 'hypot', 'pow']:
func_name = 'test_%s' % (name,)
next_test = new_binary_test(name)
next_test.func_name = func_name
locals()[func_name] = next_test
del next_test
def test_ldexp(self):
def f(x, y):
return math.ldexp(x, y)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment