summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/director_property_runme.py
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/python/director_property_runme.py')
-rw-r--r--Examples/test-suite/python/director_property_runme.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/Examples/test-suite/python/director_property_runme.py b/Examples/test-suite/python/director_property_runme.py
new file mode 100644
index 000000000..303e53b67
--- /dev/null
+++ b/Examples/test-suite/python/director_property_runme.py
@@ -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