id3c.tests.test_flyscan_repair#
Tests for id3c.utils.flyscan_repair (the repair CLI).
Synthetic master + area-detector HDF5 files; the catalog run is faked
and injected by monkeypatching _get_run. No IOC, no live catalog.
Attributes#
Functions#
|
The uid is read from /entry/entry_identifier. |
|
The external link target is resolved relative to the master dir. |
|
With no link, the AD path is composed from start metadata. |
|
A full repair writes /entry/flyscan_data with the paired frames. |
|
Running twice yields the same group (no crash on re-write). |
|
--dry-run reports but leaves the master unchanged. |
|
A master with no entry_identifier is an error. |
|
A non-existent area-detector file is an error. |
|
The CLI returns 0 and prints a summary on success. |
|
The CLI returns 1 and reports the error on failure. |
Module Contents#
- id3c.tests.test_flyscan_repair.UID_DSET = '/entry/instrument/detector/NDAttributes/NDArrayUniqueId'[source]#
- id3c.tests.test_flyscan_repair.TS_DSET = '/entry/instrument/detector/NDAttributes/NDArrayTimeStamp'[source]#
- id3c.tests.test_flyscan_repair.test_read_run_uid(tmp_path)[source]#
The uid is read from /entry/entry_identifier.
- id3c.tests.test_flyscan_repair.test_resolve_external_file_from_link(tmp_path)[source]#
The external link target is resolved relative to the master dir.
- id3c.tests.test_flyscan_repair.test_resolve_external_file_from_metadata(tmp_path)[source]#
With no link, the AD path is composed from start metadata.
- id3c.tests.test_flyscan_repair.test_repair_writes_flyscan_data(tmp_path, _patch_run)[source]#
A full repair writes /entry/flyscan_data with the paired frames.
- id3c.tests.test_flyscan_repair.test_repair_is_idempotent(tmp_path, _patch_run)[source]#
Running twice yields the same group (no crash on re-write).
- id3c.tests.test_flyscan_repair.test_dry_run_does_not_write(tmp_path, _patch_run)[source]#
–dry-run reports but leaves the master unchanged.
- id3c.tests.test_flyscan_repair.test_missing_uid_raises(tmp_path)[source]#
A master with no entry_identifier is an error.
- id3c.tests.test_flyscan_repair.test_unresolvable_ad_file_raises(tmp_path)[source]#
A non-existent area-detector file is an error.