summaryrefslogtreecommitdiffstats
path: root/xml/test_pywrap/test_prop2.py
diff options
context:
space:
mode:
authorVasilii Chernov <vchernov@inr.ru>2016-02-17 17:20:25 +0100
committerVasilii Chernov <vchernov@inr.ru>2016-02-17 17:20:25 +0100
commit9a9ffd5594a5d27bbecf6160de2c33d44870f5bd (patch)
tree1fbe5bd017cdc2e81fd7a6a45669d64276438289 /xml/test_pywrap/test_prop2.py
parent3269dce32883e14b45cc490a0cc0037b4c808a68 (diff)
downloadpcitool-9a9ffd5594a5d27bbecf6160de2c33d44870f5bd.tar.gz
pcitool-9a9ffd5594a5d27bbecf6160de2c33d44870f5bd.tar.bz2
pcitool-9a9ffd5594a5d27bbecf6160de2c33d44870f5bd.tar.xz
pcitool-9a9ffd5594a5d27bbecf6160de2c33d44870f5bd.zip
Refactor pcipywrap to object
Diffstat (limited to 'xml/test_pywrap/test_prop2.py')
-rw-r--r--xml/test_pywrap/test_prop2.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/xml/test_pywrap/test_prop2.py b/xml/test_pywrap/test_prop2.py
index d7e10bc..d78dbea 100644
--- a/xml/test_pywrap/test_prop2.py
+++ b/xml/test_pywrap/test_prop2.py
@@ -1,8 +1,6 @@
-import pcipywrap
-
-def read_from_register(value):
- return pcipywrap.get_property('/test/prop3') / 2
+def read_from_register(ctx, value):
+ return ctx.get_property('/test/prop3') / 2
-def write_to_register(value):
- pcipywrap.set_property(value*2, '/test/prop3')
+def write_to_register(ctx, value):
+ ctx.set_property(value*2, '/test/prop3')