def test_extract_version_from_fragment(fragment, canonical_name, expected): version = _extract_version_from_fragment(fragment, canonical_name) assert version == expected
def test_extract_version_from_fragment(fragment: str, canonical_name: str, expected: Optional[str]) -> None: version = _extract_version_from_fragment(fragment, canonical_name) assert version == expected