def test_no_sneaky_name_collision():
    n0 = UniquelyNamed('A_2')
    n1 = UniquelyNamed('A_2')
    n2 = UniquelyNamed('A')
    n3 = UniquelyNamed('A')
    n4 = UniquelyNamed('A')
    n0.merge_scopes(n1)
    n1.merge_scopes(n2)
    n2.merge_scopes(n3)
    n3.merge_scopes(n4)
    assert (n0.name == 'A_2_1')
    assert (n1.name == 'A_2_2')
    assert (n2.name == 'A_1')
    assert (n3.name == 'A_2')
    assert (n4.name == 'A_3')
def test_no_sneaky_name_collision():
    n0 = UniquelyNamed('A_2')
    n1 = UniquelyNamed('A_2')
    n2 = UniquelyNamed('A')
    n3 = UniquelyNamed('A')
    n4 = UniquelyNamed('A')
    n0.merge_scopes(n1)
    n1.merge_scopes(n2)
    n2.merge_scopes(n3)
    n3.merge_scopes(n4)
    assert (n0.name == 'A_2_1')
    assert (n1.name == 'A_2_2')
    assert (n2.name == 'A_1')
    assert (n3.name == 'A_2')
    assert (n4.name == 'A_3')