Update Python tests to not use flatstaticmethod access

Use Python class staticmethod syntax to access C++ static member functions,
such as Klass.memberfunction, instead of Klass_memberfunction.
Examples and test-suite changes in preparation for issue #2137.
This commit is contained in:
William S Fulton 2022-01-11 15:11:04 +00:00
commit cf8788c411
22 changed files with 52 additions and 74 deletions

View file

@ -5,7 +5,7 @@ from refcount import *
a = A3()
b1 = B(a)
b2 = B_create(a)
b2 = B.create(a)
if a.ref_count() != 3:
@ -13,7 +13,7 @@ if a.ref_count() != 3:
rca = b2.get_rca()
b3 = B_create(rca)
b3 = B.create(rca)
if a.ref_count() != 5:
raise RuntimeError("Count = %d" % a.ref_count())
@ -38,7 +38,7 @@ b5 = global_create(a)
if b5.ref_count() != 1:
raise RuntimeError
b6 = Factory_create(a)
b6 = Factory.create(a)
if b6.ref_count() != 1:
raise RuntimeError