def test_merging_scopes_transitiv2():
    n1 = UniquelyNamed('my_basename')
    n2 = UniquelyNamed('my_basename')
    n3 = UniquelyNamed('my_basename')
    n4 = UniquelyNamed('my_basename')
    n1.merge_scopes(n2)
    n3.merge_scopes(n4)
    n2.merge_scopes(n4)
    assert (n1.name == 'my_basename_1')
    assert (n2.name == 'my_basename_2')
    assert (n3.name == 'my_basename_3')
    assert (n4.name == 'my_basename_4')
def test_merging_scopes_transitiv2():
    n1 = UniquelyNamed('my_basename')
    n2 = UniquelyNamed('my_basename')
    n3 = UniquelyNamed('my_basename')
    n4 = UniquelyNamed('my_basename')
    n1.merge_scopes(n2)
    n3.merge_scopes(n4)
    n2.merge_scopes(n4)
    assert (n1.name == 'my_basename_1')
    assert (n2.name == 'my_basename_2')
    assert (n3.name == 'my_basename_3')
    assert (n4.name == 'my_basename_4')