Ejemplo n.º 1
0
def test_infinite_recursion_equals():
    a = GenericLabel(0, 15)
    b = GenericLabel(0, 13)
    a.b = b
    b.a = a

    a2 = GenericLabel(0, 15)
    b2 = GenericLabel(0, 13)
    a2.b = b2
    b2.a = a2

    assert a == a2
Ejemplo n.º 2
0
def test_list_ref_loop():
    label = GenericLabel(0, 4, document=document)
    with pytest.raises(ValueError):
        label.a = [label]