Example #1
0
def test_release_date_invalid(pyvinfo: CPythonVersionInfo, v: str) -> None:
    with pytest.raises(ValueError) as excinfo:
        pyvinfo.release_date(v)
    assert str(excinfo.value) == f"Invalid version string: {v!r}"
Example #2
0
def test_release_date_unknown(pyvinfo: CPythonVersionInfo, v: str) -> None:
    with pytest.raises(UnknownVersionError) as excinfo:
        pyvinfo.release_date(v)
    assert str(excinfo.value) == f"Unknown version: {v!r}"
    assert excinfo.value.version == v
Example #3
0
def test_release_date(pyvinfo: CPythonVersionInfo, v: str, rel: Optional[date]) -> None:
    assert pyvinfo.release_date(v) == rel