Fix python tests for old versions of Python

This commit is contained in:
William S Fulton 2015-01-31 17:38:06 +00:00
commit f1213809a2
6 changed files with 29 additions and 14 deletions

View file

@ -42,7 +42,10 @@ check(2, A_int(1.0).get())
check(3, A_int(B()).get())
check(4, A_int("hello").get())
A_int_static = A_int if is_new_style_class(A_int) else A_int(0)
if is_new_style_class(A_int):
A_int_static = A_int
else:
A_int_static = A_int(0)
check(1, A_int_static.sget(1))
check(2, A_int_static.sget(1.0))
check(3, A_int_static.sget(B()))