tests.test_binary module¶
Tests for repomatic.release.binary: the build roster and its asset names.
- tests.test_binary.test_all_targets_present(target)[source]¶
All expected targets are in the mapping.
- tests.test_binary.test_pack_binary_assets(tmp_path)[source]¶
Aliases are byte-identical copies; Python distributions are skipped.
- tests.test_binary.test_binary_format_detection(tmp_path, payload, expected)[source]¶
Executable formats are recognized from their magic bytes.
- tests.test_binary.ASSET_ARCH_LABELS = {Architecture(id='aarch64', name='ARM64 (AArch64)'): 'arm64', Architecture(id='x86_64', name='x86-64 (AMD64)'): 'x64'}¶
Short architecture spellings frozen into the published release-asset names.
BuildTarget.archcarries the canonical extra-platforms id (aarch64,x86_64), while every published download URL saysarm64orx64. This maps one onto the other, so a target key and its fields cannot drift apart.
- tests.test_binary.test_matrix_entry_is_json_safe(target_id, build_target)[source]¶
No extra-platforms trait may leak into the GitHub matrix.
build_targetsandnuitka_matrixare serialized into the metadata JSON the release workflow reads, so anArchitectureobject reaching one of those dicts breaks the whole release lane at metadata time.- Return type:
- tests.test_binary.test_enforced_floor_follows_binary_format(target_id, build_target)[source]¶
Only ELF and Mach-O record a floor a scan can measure.
A PE carries a nominal version header, so its declared floor stays documentation and
verify_binary_floorhas nothing to enforce. The format’sfloor_labelis what says which of the two a target is in.- Return type:
- tests.test_binary.test_macos_compiles_without_ccache_at_its_floor(target_id, build_target)[source]¶
macOS turns ccache off, keeps no cache, and pins its deployment target.
Every other target adds no option and no variable, and keeps its cache.
- Return type:
- tests.test_binary.test_current_build_target(monkeypatch, platform, architecture, expected)[source]¶
The machine’s platform and architecture pick its target.