def test_aliases(): g = to_networkx({'x': 1, 'y': 'x'}) assert 'y' in g.edge['x']
def test_np_graph(): g = to_networkx({'x': np.array([[1, 2]])}) assert g.node['x']['label'] == 'x=[[1 2]]'
def test_to_networkx(): g = to_networkx(dsk) assert isinstance(g, nx.DiGraph) assert all(n in g.node for n in ['x', 'a', 'z', 'b', 'y'])