swig/Examples/test-suite/python/smart_pointer_member_runme.py
Olly Betts 728b8955bd Drop support for Python classic classes
There were only needed to support Python < 2.2, and we now require at
least Python 2.6.

 Conflicts:
	.travis.yml
	Examples/test-suite/python/autodoc_runme.py
	Source/Modules/python.cxx

This is a cherry-pick and merge from patch in #1261
2018-10-12 07:10:47 +01:00

25 lines
298 B
Python

from smart_pointer_member import *
f = Foo()
f.y = 1
if f.y != 1:
raise RuntimeError
b = Bar(f)
b.y = 2
if f.y != 2:
print f.y
print b.y
raise RuntimeError
if b.x != f.x:
raise RuntimeError
if b.z != f.z:
raise RuntimeError
if Foo.z == Bar.z:
raise RuntimeError