Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
add a doctest to not blindly trust generic graph
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kliem committed Dec 18, 2019
1 parent 87c3057 commit 4110553
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sage/graphs/bipartite_graph.py
Expand Up @@ -574,7 +574,7 @@ def add_vertex(self, name=None, left=False, right=False):
def add_vertices(self, vertices, left=False, right=False):
"""
Add vertices to the bipartite graph from an iterable container of
vertices.
vertices.
Vertices that already exist in the graph will not be added again.
Expand Down Expand Up @@ -812,6 +812,10 @@ def add_edge(self, u, v=None, label=None):
Traceback (most recent call last):
...
RuntimeError: edge vertices must lie in different partitions
sage: bg.add_edges([[0, 2]])
Traceback (most recent call last):
...
RuntimeError: edge vertices must lie in different partitions
sage: bg.add_edge(0, 3); list(bg.right)
[1, 3]
sage: bg.add_edge(5, 6); 5 in bg.left; 6 in bg.right
Expand Down

0 comments on commit 4110553

Please sign in to comment.