Commit d60562a
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
0 commit comments