aboutsummaryrefslogtreecommitdiff
path: root/tests/test_interfaces.py
diff options
context:
space:
mode:
authormorefigs <morefigs@gmail.com>2018-06-22 15:59:49 +1000
committermorefigs <morefigs@gmail.com>2018-06-22 15:59:49 +1000
commitfac2f7b87ebebf0a3255b9d02cddff24fa194226 (patch)
tree04e1a5633bba9cff7a0d31908f2011f2de7a565f /tests/test_interfaces.py
parent4b22b288484dbdd7b614334cc328588df3e141ec (diff)
downloadpymba-fac2f7b87ebebf0a3255b9d02cddff24fa194226.tar.gz
pymba-fac2f7b87ebebf0a3255b9d02cddff24fa194226.zip
rename
Diffstat (limited to 'tests/test_interfaces.py')
-rw-r--r--tests/test_interfaces.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/test_interfaces.py b/tests/test_interfaces.py
new file mode 100644
index 0000000..270d42c
--- /dev/null
+++ b/tests/test_interfaces.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+from __future__ import absolute_import, print_function, division
+from pymba import *
+import time
+
+
+def test_interfaces():
+ # start Vimba
+ with Vimba() as vimba:
+ # get list of available interfaces
+ interfaceIds = vimba.getInterfaceIds()
+ for interfaceId in interfaceIds:
+ print('Interface ID:', interfaceId)
+
+ # get interface object and open it
+ interface0 = vimba.getInterface(interfaceIds[0])
+ interface0.openInterface()
+
+ # list interface features
+ interfaceFeatureNames = interface0.getFeatureNames()
+ for name in interfaceFeatureNames:
+ print('Interface feature:', name)
+
+ # close interface
+ interface0.closeInterface()
+
+if __name__ == '__main__':
+ test_interfaces() \ No newline at end of file