summaryrefslogtreecommitdiff
path: root/Examples/python/import
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2022-01-11 15:11:04 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2022-01-14 22:48:11 +0000
commitcf8788c411d8096104628dfd5901620b8ea3a315 (patch)
treea03bd6e7816dab242539d75db9d002f71e99e3df /Examples/python/import
parent761099720966c2d6701a1dc1473e918de3571665 (diff)
downloadswig-cf8788c411d8096104628dfd5901620b8ea3a315.tar.gz
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.
Diffstat (limited to 'Examples/python/import')
-rw-r--r--Examples/python/import/runme.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Examples/python/import/runme.py b/Examples/python/import/runme.py
index afa21a2b3..7970dec26 100644
--- a/Examples/python/import/runme.py
+++ b/Examples/python/import/runme.py
@@ -84,14 +84,14 @@ x.B()
print("\nTesting some dynamic casts\n")
x = d.toBase()
-y = foo.Foo_fromBase(x)
+y = foo.Foo.fromBase(x)
print(" Spam -> Base -> Foo : {} swig".format("bad" if y else "good"))
-y = bar.Bar_fromBase(x)
+y = bar.Bar.fromBase(x)
print(" Spam -> Base -> Bar : {} swig".format("good" if y else "bad"))
-y = spam.Spam_fromBase(x)
+y = spam.Spam.fromBase(x)
print(" Spam -> Base -> Spam : {} swig".format("good" if y else "bad"))
-y = spam.Spam_fromBase(b)
+y = spam.Spam.fromBase(b)
print(" Foo -> Spam : {} swig".format("bad" if y else "good"))