diff options
Diffstat (limited to 'numpy/f2py/tests/test_callback.py')
-rw-r--r-- | numpy/f2py/tests/test_callback.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/numpy/f2py/tests/test_callback.py b/numpy/f2py/tests/test_callback.py index 6ae473ac7..7a7e8bc11 100644 --- a/numpy/f2py/tests/test_callback.py +++ b/numpy/f2py/tests/test_callback.py @@ -74,24 +74,24 @@ cf2py intent(out) a def check_function(self, name): t = getattr(self.module, name) r = t(lambda : 4) - assert_( r==4,`r`) + assert_( r==4,repr(r)) r = t(lambda a:5,fun_extra_args=(6,)) - assert_( r==5,`r`) + assert_( r==5,repr(r)) r = t(lambda a:a,fun_extra_args=(6,)) - assert_( r==6,`r`) + assert_( r==6,repr(r)) r = t(lambda a:5+a,fun_extra_args=(7,)) - assert_( r==12,`r`) + assert_( r==12,repr(r)) r = t(lambda a:math.degrees(a),fun_extra_args=(math.pi,)) - assert_( r==180,`r`) + assert_( r==180,repr(r)) r = t(math.degrees,fun_extra_args=(math.pi,)) - assert_( r==180,`r`) + assert_( r==180,repr(r)) r = t(self.module.func, fun_extra_args=(6,)) - assert_( r==17,`r`) + assert_( r==17,repr(r)) r = t(self.module.func0) - assert_( r==11,`r`) + assert_( r==11,repr(r)) r = t(self.module.func0._cpointer) - assert_( r==11,`r`) + assert_( r==11,repr(r)) class A(object): def __call__(self): return 7 @@ -99,9 +99,9 @@ cf2py intent(out) a return 9 a = A() r = t(a) - assert_( r==7,`r`) + assert_( r==7,repr(r)) r = t(a.mth) - assert_( r==9,`r`) + assert_( r==9,repr(r)) if __name__ == "__main__": import nose |