def test_version_parse_dev2(): v = '7.18.1-rc.2' h = ProjectHolder() v = h.sanitize_version(v, pre_ok=True) assert v.is_prerelease is True
def test_version_parse_dev(): v = '1.19rc1' h = ProjectHolder() v = h.sanitize_version(v, pre_ok=True) assert v.is_prerelease is True
def test_version_parse_dev3(): """Test parsing stable version leaves pre-release flag false.""" v = '7.18.1' h = ProjectHolder() v = h.sanitize_version(v, pre_ok=True) assert v.is_prerelease is False
def test_version_parse_dev2(): """Test version parsing to detect -rc.2 type suffix as a pre-release.""" v = '7.18.1-rc.2' h = ProjectHolder() v = h.sanitize_version(v, pre_ok=True) assert v.is_prerelease is True
def test_version_parse_dev(): """Test version parsing to detect rc1 type suffix as a pre-release.""" v = '1.19rc1' h = ProjectHolder() v = h.sanitize_version(v, pre_ok=True) assert v.is_prerelease is True
def test_version_parse_with_dot_x(): v = '1.19.x' h = ProjectHolder() assert h.sanitize_version(v) is False