"""Regression tests for pypa/packaging #1108: perf: SpecifierSet use tuple instead of frozenset for `_specs`

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_1108_p1_len_0():
    """Breakwater P1: base behaviour pinned (found by differential testing; label: likely-bug)."""
    from packaging.specifiers import SpecifierSet
    assert len(SpecifierSet('>=1.0,>=1.0.0')) == 1


def test_1108_p1_len_1():
    """Breakwater P1: base behaviour pinned (found by differential testing; label: likely-bug)."""
    from packaging.specifiers import SpecifierSet
    assert len(SpecifierSet('>= 1.0,>=1.0.0')) == 1


def test_1108_p1_len_2():
    """Breakwater P1: base behaviour pinned (found by differential testing; label: likely-bug)."""
    from packaging.specifiers import SpecifierSet
    assert len(SpecifierSet('\xa0>=1.0,>=1.0.0\xa0')) == 1


def test_1108_p1_str_3():
    """Breakwater P1: base behaviour pinned (found by differential testing; label: likely-bug)."""
    from packaging.specifiers import SpecifierSet
    assert str(SpecifierSet('>=1.0,>=1.0.0')) == '>=1.0'


def test_1108_p1_str_4():
    """Breakwater P1: base behaviour pinned (found by differential testing; label: likely-bug)."""
    from packaging.specifiers import SpecifierSet
    assert str(SpecifierSet('>= 1.0,>=1.0.0')) == '>=1.0'


def test_1108_p1_str_5():
    """Breakwater P1: base behaviour pinned (found by differential testing; label: likely-bug)."""
    from packaging.specifiers import SpecifierSet
    assert str(SpecifierSet('\xa0>=1.0,>=1.0.0\xa0')) == '>=1.0'


def test_1108_p2_outcome_6():
    """Breakwater P2: base behaviour pinned (found by differential testing; label: needs-human)."""
    import pytest
    from packaging.specifiers import SpecifierSet
    with pytest.raises(AssertionError) as excinfo:
        SpecifierSet('>=10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0,>=1.0.0')
    assert type(excinfo.value) is AssertionError  # exact type: a subclass would be a behaviour change


def test_1108_p3_eq_7():
    """Breakwater P3: base behaviour pinned (found by differential testing; label: likely-bug)."""
    from packaging.specifiers import SpecifierSet
    a = SpecifierSet('>=1.0,>=1.0.0')
    b = SpecifierSet('>=1.0.0,>=1.0.0')
    assert (a == b) is True


def test_1108_p3_hash_eq_8():
    """Breakwater P3: base behaviour pinned (found by differential testing; label: likely-bug)."""
    from packaging.specifiers import SpecifierSet
    a = SpecifierSet('>=1.0,>=1.0.0')
    b = SpecifierSet('>=1.0.0,>=1.0.0')
    assert (hash(a) == hash(b)) is True


def test_1108_p4_base_head_eq_fresh_9():
    """Breakwater P4: base behaviour pinned (found by differential testing; label: likely-bug)."""
    import base64
    import pickle

    from packaging.specifiers import SpecifierSet
    # pickled by the base version (lazy caches warmed first)
    old = pickle.loads(base64.b64decode('gASVDwEAAAAAAACMFHBhY2thZ2luZy5zcGVjaWZpZXJzlIwMU3BlY2lmaWVyU2V0lJOUKYGUTn2UKIwMX3ByZXJlbGVhc2VzlE6MBl9zcGVjc5QoaACMCVNwZWNpZmllcpSTlCmBlE59lChoBU6MBV9zcGVjlIwCPj2UjAMxLjCUhpSMDV9zcGVjX3ZlcnNpb26UaA2MEXBhY2thZ2luZy52ZXJzaW9ulIwHVmVyc2lvbpSTlCmBlE59lCiMBF9kZXaUTowGX2Vwb2NolEsAjApfa2V5X2NhY2hllE6MBl9sb2NhbJROjAVfcG9zdJROjARfcHJllE6MCF9yZWxlYXNllEsBSwCGlHWGlGKGlHWGlGKRlHWGlGIu'))
    assert old == SpecifierSet('>=1.0,>=1.0.0')


def test_1108_p4_base_head_eq_fresh_10():
    """Breakwater P4: base behaviour pinned (found by differential testing; label: likely-bug)."""
    import base64
    import pickle

    from packaging.specifiers import SpecifierSet
    # pickled by the base version (lazy caches warmed first)
    old = pickle.loads(base64.b64decode('gASVUAAAAAAAAACMFHBhY2thZ2luZy5zcGVjaWZpZXJzlIwMU3BlY2lmaWVyU2V0lJOUKYGUTn2UKIwMX3ByZXJlbGVhc2VzlE6MBl9zcGVjc5QokZR1hpRiLg=='))
    assert old == SpecifierSet('')
