diff options
| author | John Sun <jsun@sightmachine.com> | 2014-04-02 17:08:07 -0700 |
|---|---|---|
| committer | John Sun <jsun@sightmachine.com> | 2014-04-02 17:08:07 -0700 |
| commit | c40423dd47d6ba56469ae1faf306d95d6be5cd5c (patch) | |
| tree | 3333906a098b9c22a3e89ec53473a0acec7d0c43 /pyvimba/tests/test_interfaces.py | |
| parent | 01e24424971ffa9faa5dabf2e6724cea997a2afb (diff) | |
| download | pymba-c40423dd47d6ba56469ae1faf306d95d6be5cd5c.tar.gz pymba-c40423dd47d6ba56469ae1faf306d95d6be5cd5c.zip | |
Add some tests
test_systemfeature.py is broken because I think this is invalid API.
Diffstat (limited to 'pyvimba/tests/test_interfaces.py')
| -rw-r--r-- | pyvimba/tests/test_interfaces.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/pyvimba/tests/test_interfaces.py b/pyvimba/tests/test_interfaces.py new file mode 100644 index 0000000..2620289 --- /dev/null +++ b/pyvimba/tests/test_interfaces.py @@ -0,0 +1,29 @@ +#!/usr/bin/python + +from pyvimba.vimba import * +import time + +def test_interfaces(): + # start Vimba + vimba = Vimba() + vimba.startup() + + # 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() + + # shutdown Vimba + vimba.shutdown() |
