"""Regression tests for pypa/packaging 1082@61967cca: perf: fast path for simple versions (intermediate commit 61967cca)

Generated by Breakwater. Each test passed on the base commit and failed on the head commit when
generated; it pins the old behaviour.
"""


def test_1082_61967cca_p2_outcome_0():
    """Breakwater P2: base behaviour pinned (found by differential testing; label: likely-bug)."""
    import pytest
    from packaging.version import InvalidVersion, Version
    with pytest.raises(InvalidVersion) as excinfo:
        Version('٠')
    assert type(excinfo.value) is InvalidVersion  # exact type: a subclass would be a behaviour change


def test_1082_61967cca_p2_outcome_1():
    """Breakwater P2: base behaviour pinned (found by differential testing; label: likely-bug)."""
    import pytest
    from packaging.version import Version
    with pytest.raises(TypeError) as excinfo:
        Version(['..0'])
    assert type(excinfo.value) is TypeError  # exact type: a subclass would be a behaviour change


def test_1082_61967cca_p2_outcome_2():
    """Breakwater P2: base behaviour pinned (found by differential testing; label: likely-bug)."""
    import pytest
    from packaging.version import InvalidVersion, Version
    with pytest.raises(InvalidVersion) as excinfo:
        Version('1 .2')
    assert type(excinfo.value) is InvalidVersion  # exact type: a subclass would be a behaviour change


def test_1082_61967cca_p2_outcome_3():
    """Breakwater P2: base behaviour pinned (found by differential testing; label: likely-bug)."""
    import pytest
    from packaging.version import InvalidVersion, Version
    with pytest.raises(InvalidVersion) as excinfo:
        Version('١ .2')
    assert type(excinfo.value) is InvalidVersion  # exact type: a subclass would be a behaviour change


def test_1082_61967cca_p2_outcome_4():
    """Breakwater P2: base behaviour pinned (found by differential testing; label: needs-human)."""
    import pytest
    from packaging.version import InvalidVersion, Version
    with pytest.raises(InvalidVersion) as excinfo:
        Version('1' + '0' * 4299 + ' ' + '.' + '2')
    assert type(excinfo.value) is InvalidVersion  # exact type: a subclass would be a behaviour change


def test_1082_61967cca_p2_outcome_5():
    """Breakwater P2: base behaviour pinned (found by differential testing; label: needs-human)."""
    import pytest
    from packaging.version import Version
    with pytest.raises(ValueError) as excinfo:
        Version('1' + '0' * 4300 + '.' + '0' + '.' + '1')
    assert type(excinfo.value) is ValueError  # exact type: a subclass would be a behaviour change
