sbom-tools 0.2.0

Semantic SBOM diff and analysis tool
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from __future__ import annotations

from pathlib import Path

from sbomtools import detect_format

FIXTURE = Path(__file__).parent.parent / "fixtures" / "minimal.cdx.json"


def test_detect_format_reports_cyclonedx(native_library: None) -> None:
    result = detect_format(FIXTURE.read_text(encoding="utf-8"))

    assert result is not None
    assert result.format_name == "CycloneDX"
    assert result.version == "1.5"