def test_pair_set():
    ps = PairSet()

    ps.add(1, 2)
    ps.add(2, 4)

    assert ps.has(1, 2)
    assert ps.has(2, 1)
    assert ps in (1, 2)
    assert (2, 1) in ps
    assert ps.has(4, 2)
    assert ps.has(2, 4)

    assert not ps.has(2, 3)
    assert not ps.has(1, 3)

    ps.remove(1, 2)
    assert not ps.has(1, 2)
    assert not ps.has(2, 1)
    assert (1, 2) not in ps
    assert (2, 1) not in ps

    assert ps.has(4, 2)
    assert ps.has(2, 4)
dataset/ETHPy150Open graphql-python/graphql-core/tests/core_pyutils/test_pair_set.py/test_pair_set/swapped operands of `in`