def test_link_str():
    """Links should have sensible names"""
    d = Data(x=[1, 2, 3], y=[2, 3, 4])
    x = d.id['x']
    y = d.id['y']

    assert str(x + y) == ('(x + y)')
    assert str(x - y) == ('(x - y)')
    assert str(x * y) == ('(x * y)')
    assert str(x / y) == ('(x / y)')
    assert str(x ** y) == ('(x ** y)')
    assert str(x ** 3) == ('(x ** 3)')
    assert str(3 + x * y) == ('(3 + (x * y))')
    assert str(x + x + y) == ('((x + x) + y)')

    assert repr(x + y) == '<BinaryComponentLink: (x + y)>'
dataset/ETHPy150Open glue-viz/glue/glue/core/tests/test_component_link.py/test_link_str/original