Test-suite fixes for python -classic

These are mostly workarounds for static class members not being supported for
old style classes, as documented in Python.html, "C++ classes".
This commit is contained in:
William S Fulton 2015-01-31 15:04:35 +00:00
commit 76bcec1d87
18 changed files with 118 additions and 41 deletions

View file

@ -1,4 +1,8 @@
from overload_template_fast import *
def is_new_style_class(cls):
return hasattr(cls, "__class__")
f = foo()
a = maximum(3,4)
@ -140,6 +144,9 @@ if (nsoverload() != 1050):
raise RuntimeError, ("nsoverload(const char *)")
A.foo(1)
if is_new_style_class(A):
A.foo(1)
else:
A_foo(1)
b = B()
b.foo(1)