summaryrefslogtreecommitdiffstats
path: root/xml/test/test_prop2.py
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2016-02-23 07:20:33 +0100
committerSuren A. Chilingaryan <csa@suren.me>2016-02-23 07:20:33 +0100
commita962c90543955bac98308c1b0d909048070d900a (patch)
tree70b06851187e6bf8cfd8ee28931bdea25ea92ac7 /xml/test/test_prop2.py
parent055279e09c3db9429e02874ec9620b9af357c80a (diff)
parent52eb7f4fb76ddf99dedf44332aae7af4df76ab36 (diff)
downloadpcitool-a962c90543955bac98308c1b0d909048070d900a.tar.gz
pcitool-a962c90543955bac98308c1b0d909048070d900a.tar.bz2
pcitool-a962c90543955bac98308c1b0d909048070d900a.tar.xz
pcitool-a962c90543955bac98308c1b0d909048070d900a.zip
Merge Python scripting support from Vasiliy Chernov
Diffstat (limited to 'xml/test/test_prop2.py')
-rw-r--r--xml/test/test_prop2.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/xml/test/test_prop2.py b/xml/test/test_prop2.py
new file mode 100644
index 0000000..d78dbea
--- /dev/null
+++ b/xml/test/test_prop2.py
@@ -0,0 +1,6 @@
+def read_from_register(ctx, value):
+ return ctx.get_property('/test/prop3') / 2
+
+def write_to_register(ctx, value):
+ ctx.set_property(value*2, '/test/prop3')
+