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}"
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
def test_release_date(pyvinfo: CPythonVersionInfo, v: str, rel: Optional[date]) -> None: assert pyvinfo.release_date(v) == rel