def test_version(): assert isinstance(__version__, str) major, minor, is_unstable = _parse_version(__version__) assert isinstance(major, int) assert isinstance(minor, int) assert isinstance(is_unstable, bool)
def test_version_parser(version: str, expected: Tuple[int, int, int]): assert _parse_version(version) == expected
def test_version_with_error(): with pytest.raises(ValueError): _parse_version("not_a_version")
def test_version(): assert isinstance(__version__, str) versions: (int, int, int) = _parse_version(__version__) for v in versions: assert isinstance(v, int)