示例#1
0
def test_repr(nodes):
    """Test printing the node."""

    v, w = nodes

    vw = Edge(v, w, 'vw')

    assert vw.__repr__() == 'Edge vw'

    vw = Edge(v, w)

    assert vw.__repr__().replace('>', '').split(' ')[-1] == vw.uid
示例#2
0
def test_repr(nodes):
    """Test printing the node."""

    v, w = nodes

    vw = Edge(v, w, 'vw')

    assert vw.__repr__() == 'Edge vw'