id3c.tests.test_external_link_target#
Tests for id3c.plans.flyscan_3idc._external_link_target.
Pure-Python: builds duck-typed det.hdf1 objects from synthetic templates and IOC paths, exercises the common-suffix construction, the legacy fallback, and the warning paths.
Functions#
write_path_template prefix is stripped from full_file_name. |
|
write_path_template without a trailing slash is normalized. |
|
A non-default ad_files_root parameter is honoured. |
|
Missing write_path_template falls back to legacy target. |
|
|
Stale write_path_template (no prefix match) falls back. |
Empty suffix when full_file_name equals the template. |
|
Falls back to _write_path_template if write_path_template is absent. |
Module Contents#
- id3c.tests.test_external_link_target.test_strips_write_path_template_prefix()[source]#
write_path_template prefix is stripped from full_file_name.
The remaining common suffix is appended to the per-detector root.
- id3c.tests.test_external_link_target.test_handles_template_without_trailing_slash()[source]#
write_path_template without a trailing slash is normalized.
- id3c.tests.test_external_link_target.test_custom_ad_files_root()[source]#
A non-default ad_files_root parameter is honoured.
- id3c.tests.test_external_link_target.test_falls_back_when_template_missing(caplog)[source]#
Missing write_path_template falls back to legacy target.
Encapsulates the full absolute path and logs a WARNING.
- id3c.tests.test_external_link_target.test_falls_back_when_template_does_not_prefix_full_file_name(caplog)[source]#
Stale write_path_template (no prefix match) falls back.
Logs a WARNING and uses the legacy absolute-path target.