def test_empty_edge_raises_error(self):
     with pytest.raises(AssertionError):
         G.graph('xy,')
 def test_multiplicity_is_preserved_in_hyperedges(self):    
     assert G.graph('xyz,xyz') != G.graph('xyz')
 def test_empty_graph_raises_error(self):
     with pytest.raises(AssertionError):
         G.graph('')
 def test_multi_edge_is_a_graph(self):
     assert G.graph('xy,xy') in ['xy,xy', 'xy,yx', 'yx,xy', 'yx,yx']
 def test_collapsed_edge_is_a_graph(self):
     assert G.graph('xyx') in ['xxy', 'xyx', 'yxx']
 def test_hyper_edge_is_a_graph(self):
     assert G.graph('xyz') in ['xyz', 'xzy', 'yxz', 'yzx', 'zxy', 'zyx']
 def test_simple_edge_is_a_graph(self):
     assert G.graph('xy') in ['xy', 'yx']
 def test_loop_is_a_graph(self):
     assert G.graph('xx') == 'xx'
 def test_isolated_vertex_with_multiplicity_is_a_graph(self):
     assert G.graph('x,x') == 'x,x'
Esempio n. 10
0
 def test_isolated_vertex_is_a_graph(self):
     assert G.graph('x') == 'x'