コード例 #1
0
ファイル: test_dot.py プロジェクト: ogrisel/dask
def test_aliases():
    g = to_networkx({'x': 1, 'y': 'x'})
    assert 'y' in g.edge['x']
コード例 #2
0
ファイル: test_dot.py プロジェクト: ogrisel/dask
def test_np_graph():
    g = to_networkx({'x': np.array([[1, 2]])})
    assert g.node['x']['label'] == 'x=[[1 2]]' 
コード例 #3
0
ファイル: test_dot.py プロジェクト: ogrisel/dask
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'])