Ejemplo n.º 1
0
 def test_empty_edge_raises_error(self):
     with pytest.raises(AssertionError):
         G.graph('xy,')
Ejemplo n.º 2
0
 def test_multiplicity_is_preserved_in_hyperedges(self):    
     assert G.graph('xyz,xyz') != G.graph('xyz')
Ejemplo n.º 3
0
 def test_empty_graph_raises_error(self):
     with pytest.raises(AssertionError):
         G.graph('')
Ejemplo n.º 4
0
 def test_multi_edge_is_a_graph(self):
     assert G.graph('xy,xy') in ['xy,xy', 'xy,yx', 'yx,xy', 'yx,yx']
Ejemplo n.º 5
0
 def test_collapsed_edge_is_a_graph(self):
     assert G.graph('xyx') in ['xxy', 'xyx', 'yxx']
Ejemplo n.º 6
0
 def test_hyper_edge_is_a_graph(self):
     assert G.graph('xyz') in ['xyz', 'xzy', 'yxz', 'yzx', 'zxy', 'zyx']
Ejemplo n.º 7
0
 def test_simple_edge_is_a_graph(self):
     assert G.graph('xy') in ['xy', 'yx']
Ejemplo n.º 8
0
 def test_loop_is_a_graph(self):
     assert G.graph('xx') == 'xx'
Ejemplo n.º 9
0
 def test_isolated_vertex_with_multiplicity_is_a_graph(self):
     assert G.graph('x,x') == 'x,x'
Ejemplo n.º 10
0
 def test_isolated_vertex_is_a_graph(self):
     assert G.graph('x') == 'x'