summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/director_property_runme.py
blob: 5d713c27f73212f5d480b8f11f1837bf78e5fe8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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