コード例 #1
0
def test_is_supported_invalid(pyvinfo: CPythonVersionInfo, v: str) -> None:
    with pytest.raises(ValueError) as excinfo:
        pyvinfo.is_supported(v)
    assert str(excinfo.value) == f"Invalid version string: {v!r}"
コード例 #2
0
def test_is_supported_unknown(pyvinfo: CPythonVersionInfo, v: str) -> None:
    with pytest.raises(UnknownVersionError) as excinfo:
        pyvinfo.is_supported(v)
    assert str(excinfo.value) == f"Unknown version: {v!r}"
    assert excinfo.value.version == v
コード例 #3
0
def test_is_supported(
    pyvinfo: CPythonVersionInfo, series: str, is_supported: bool
) -> None:
    assert pyvinfo.is_supported(series) is is_supported