Skip to content

Commit

Permalink
Fixed test version
Browse files Browse the repository at this point in the history
  • Loading branch information
morefigs committed May 28, 2019
1 parent a479486 commit 1a65afc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pymba/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from .vimba import Vimba, VimbaException
from .frame import Frame

__version__ = '0.3.4'
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from setuptools import setup
from pymba import __version__


setup(name='pymba',
version='0.3.4',
version=__version__,
description="Pymba is a Python wrapper for Allied Vision's Vimba C API.",
long_description=(
"Pymba is a Python wrapper for Allied Vision's Vimba C API. It wraps the Vimba C library "
Expand Down
9 changes: 9 additions & 0 deletions tests/test_vimba.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
from pymba import Vimba, VimbaException


def test_version():
version = [int(v) for v in Vimba.version().split('.')]
assert version[0] >= 1
assert version[1] >= 7
assert version[2] >= 0


def test_startup_shutdown():
with pytest.raises(VimbaException) as e:
Vimba().system().feature_names()
Expand All @@ -23,6 +30,7 @@ def vimba() -> Vimba:
yield vimba


# requires a camera connected
def test_interface_camera_ids(vimba: Vimba):
# test id funcs return a list of strings (not bytes)
for func in (vimba.interface_ids, vimba.camera_ids):
Expand All @@ -37,5 +45,6 @@ def test_interface(vimba: Vimba):
interface = vimba.interface(vimba.interface_ids()[0])


# requires a camera connected
def test_camera(vimba: Vimba):
camera = vimba.camera(vimba.camera_ids()[0])

0 comments on commit 1a65afc

Please sign in to comment.