コード例 #1
0
ファイル: test_pairs.py プロジェクト: ArtShp/DataScience
 def test_node_attribute_xy_directed(self):
     attrxy = sorted(nx.node_attribute_xy(self.D, 'fish'))
     attrxy_result = sorted([('one', 'one'),
                             ('two', 'two'),
                             ('one', 'red'),
                             ('two', 'blue')
                             ])
     assert attrxy == attrxy_result
コード例 #2
0
ファイル: test_pairs.py プロジェクト: ProgVal/networkx
 def test_node_attribute_xy_directed(self):
     attrxy = sorted(nx.node_attribute_xy(self.D, 'fish'))
     attrxy_result = sorted([('one', 'one'),
                             ('two', 'two'),
                             ('one', 'red'),
                             ('two', 'blue')
                             ])
     assert_equal(attrxy, attrxy_result)
コード例 #3
0
ファイル: test_pairs.py プロジェクト: ProgVal/networkx
 def test_node_attribute_xy_multigraph(self):
     attrxy = sorted(nx.node_attribute_xy(self.M, 'fish'))
     attrxy_result = [('one', 'one'),
                      ('one', 'one'),
                      ('one', 'one'),
                      ('one', 'one'),
                      ('two', 'two'),
                      ('two', 'two')
                      ]
     assert_equal(attrxy, attrxy_result)
コード例 #4
0
ファイル: test_pairs.py プロジェクト: ArtShp/DataScience
 def test_node_attribute_xy_multigraph(self):
     attrxy = sorted(nx.node_attribute_xy(self.M, 'fish'))
     attrxy_result = [('one', 'one'),
                      ('one', 'one'),
                      ('one', 'one'),
                      ('one', 'one'),
                      ('two', 'two'),
                      ('two', 'two')
                      ]
     assert attrxy == attrxy_result
コード例 #5
0
ファイル: test_pairs.py プロジェクト: Cold5nap/sobolIter
 def test_node_attribute_xy_multigraph(self):
     attrxy = sorted(nx.node_attribute_xy(self.M, "fish"))
     attrxy_result = [
         ("one", "one"),
         ("one", "one"),
         ("one", "one"),
         ("one", "one"),
         ("two", "two"),
         ("two", "two"),
     ]
     assert attrxy == attrxy_result
コード例 #6
0
 def test_node_attribute_xy_undirected(self):
     attrxy=sorted(nx.node_attribute_xy(self.G,'fish'))
     attrxy_result=sorted([('one','one'),
                           ('one','one'),
                           ('two','two'),
                           ('two','two'),
                           ('one','red'),
                           ('red','one'),
                           ('blue','two'),
                           ('two','blue')
                           ])
     assert_equal(attrxy,attrxy_result)
コード例 #7
0
ファイル: test_pairs.py プロジェクト: Cold5nap/sobolIter
 def test_node_attribute_xy_undirected(self):
     attrxy = sorted(nx.node_attribute_xy(self.G, "fish"))
     attrxy_result = sorted([
         ("one", "one"),
         ("one", "one"),
         ("two", "two"),
         ("two", "two"),
         ("one", "red"),
         ("red", "one"),
         ("blue", "two"),
         ("two", "blue"),
     ])
     assert attrxy == attrxy_result
コード例 #8
0
ファイル: test_pairs.py プロジェクト: Bludge0n/AREsoft
 def test_node_attribute_xy_undirected(self):
     attrxy = sorted(nx.node_attribute_xy(self.G, "fish"))
     attrxy_result = sorted(
         [
             ("one", "one"),
             ("one", "one"),
             ("two", "two"),
             ("two", "two"),
             ("one", "red"),
             ("red", "one"),
             ("blue", "two"),
             ("two", "blue"),
         ]
     )
     assert_equal(attrxy, attrxy_result)
コード例 #9
0
 def test_node_attribute_xy_selfloop(self):
     attrxy = sorted(nx.node_attribute_xy(self.S, 'fish'))
     attrxy_result = [('one', 'one'), ('two', 'two')]
     assert attrxy == attrxy_result
コード例 #10
0
 def test_node_attribute_xy_undirected_nodes(self):
     attrxy = sorted(
         nx.node_attribute_xy(self.G, 'fish', nodes=['one', 'yellow']))
     attrxy_result = sorted([])
     assert attrxy == attrxy_result
コード例 #11
0
ファイル: test_pairs.py プロジェクト: ProgVal/networkx
 def test_node_attribute_xy_undirected_nodes(self):
     attrxy = sorted(nx.node_attribute_xy(self.G, 'fish',
                                          nodes=['one', 'yellow']))
     attrxy_result = sorted([
     ])
     assert_equal(attrxy, attrxy_result)
コード例 #12
0
ファイル: test_pairs.py プロジェクト: Cold5nap/sobolIter
 def test_node_attribute_xy_selfloop(self):
     attrxy = sorted(nx.node_attribute_xy(self.S, "fish"))
     attrxy_result = [("one", "one"), ("two", "two")]
     assert attrxy == attrxy_result
コード例 #13
0
ファイル: test_pairs.py プロジェクト: Cold5nap/sobolIter
 def test_node_attribute_xy_undirected_nodes(self):
     attrxy = sorted(
         nx.node_attribute_xy(self.G, "fish", nodes=["one", "yellow"]))
     attrxy_result = sorted([])
     assert attrxy == attrxy_result
コード例 #14
0
ファイル: test_pairs.py プロジェクト: Bludge0n/AREsoft
 def test_node_attribute_xy_selfloop(self):
     attrxy = sorted(nx.node_attribute_xy(self.S, "fish"))
     attrxy_result = [("one", "one"), ("two", "two")]
     assert_equal(attrxy, attrxy_result)