Python: Fix property access with director
This commit is contained in:
parent
de6b433cb1
commit
558af639bd
4 changed files with 178 additions and 3 deletions
18
Examples/test-suite/python/director_property_runme.py
Normal file
18
Examples/test-suite/python/director_property_runme.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import director_property
|
||||
|
||||
class PyFoo(director_property.Foo):
|
||||
a = property(director_property.Foo.getA, director_property.Foo.setA)
|
||||
|
||||
def ping(self):
|
||||
return "PyFoo::ping()"
|
||||
|
||||
|
||||
foo = PyFoo()
|
||||
|
||||
foo.setA("BLABLA")
|
||||
if foo.getA() != "BLABLA":
|
||||
raise RuntimeError
|
||||
|
||||
foo.a = "BIBI"
|
||||
if foo.a != "BIBI":
|
||||
raise RuntimeError
|
||||
Loading…
Add table
Add a link
Reference in a new issue