File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 99 Tuple ,
1010 Union ,
1111)
12-
12+ from importlib . metadata import version , PackageNotFoundError
1313import numpy .typing as npt
1414
1515from . import acquire
1616from .acquire import *
1717
18+ try :
19+ __version__ = version ("acquire-imaging" )
20+ except PackageNotFoundError :
21+ __version__ = "uninstalled"
22+
1823__doc__ = acquire .__doc__
1924
2025import logging
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import napari # type: ignore
44
55from .acquire import Runtime , Properties
66
7+ __version__ : str
8+
79def setup (
810 runtime : Runtime ,
911 camera : Union [str , List [str ]] = ...,
Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ def runtime():
1818 yield acquire .Runtime ()
1919
2020
21+ def test_version ():
22+ assert isinstance (acquire .__version__ , str )
23+ # this will fail if pip install -e . has not been run
24+ # so feel free to remove this line if it's not what you want to test
25+ assert acquire .__version__ != "uninstalled"
26+
27+
2128def test_set ():
2229 t = Trigger ()
2330 assert not t .enable
You can’t perform that action at this time.
0 commit comments