Skip to content

Commit d60562a

Browse files
committed
Add fake GenTL fixtures and gentl backend tests
Introduce a lightweight, SDK-free fake GenTL/Harvesters implementation and associated pytest fixtures to enable strict lifecycle unit tests for the gentl backend. Replaces the old _DeviceInfoAdapter with a robust attribute/dict reader (_info_get), implements _FakeNode/_FakeNodeMap/_FakeComponent/_FakePayload and a dataclass FakeImageAcquirer with strict start/fetch semantics and call tracing. Adds FakeHarvester with inventory-driven device_info_list, create/create_image_acquirer compatibility and call recording, plus fixtures gentl_inventory, fake_harvester_factory, patch_gentl_sdk (patches backend to use fakes) and gentl_settings_factory. Also adds tests/cameras/backends/test_gentl_backend.py with comprehensive unit tests covering open/read/close, fast_start behavior, device selection (serial/fingerprint), rebind_settings, discover_devices, resolution alignment, pixel format handling, and other edge cases to validate the gentl backend behavior.
1 parent e1e5a03 commit d60562a

3 files changed

Lines changed: 755 additions & 135 deletions

File tree

.coveragerc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,4 @@
33
[run]
44
branch = True
55
source = dlclivegui
6-
omit =
7-
# omit only the parts that are pure passthrough shims to SDKs
8-
dlclivegui/cameras/backends/basler_backend.py
9-
dlclivegui/cameras/backends/gentl_backend.py
6+
# omit =

0 commit comments

Comments
 (0)