Ejemplo n.º 1
0
def test_is_released_invalid(pyvinfo: CPythonVersionInfo, v: str) -> None:
    with pytest.raises(ValueError) as excinfo:
        pyvinfo.is_released(v)
    assert str(excinfo.value) == f"Invalid version string: {v!r}"
Ejemplo n.º 2
0
def test_is_released_unknown(pyvinfo: CPythonVersionInfo, v: str) -> None:
    with pytest.raises(UnknownVersionError) as excinfo:
        pyvinfo.is_released(v)
    assert str(excinfo.value) == f"Unknown version: {v!r}"
    assert excinfo.value.version == v
Ejemplo n.º 3
0
def test_is_released(pyvinfo: CPythonVersionInfo, v: str, rel: bool) -> None:
    assert pyvinfo.is_released(v) is rel