Ticket #7853: trac_7853.patch

File trac_7853.patch, 1.1 KB (added by ncohen, 11 years ago)

Apply on top of patches from #7634

  • sage/graphs/generic_graph.py

    # HG changeset patch
    # User Nathann Cohen <nathann.cohen@gmail.com>
    # Date 1262773421 -3600
    # Node ID 6f5e73ba7b1e4b086a0ef5f988ea3d8cb4993819
    # Parent  2ae275b5409c88f93dc342d15ef5a88f3b08c07b
    Bug in Graph.block_and_cut_vertices
    
    diff -r 2ae275b5409c -r 6f5e73ba7b1e sage/graphs/generic_graph.py
    a b  
    29372937            sage: Graph(0).blocks_and_cut_vertices()
    29382938            ([], [])
    29392939            sage: Graph(1).blocks_and_cut_vertices()
    2940             ([0], [0])
     2940            ([0], [])
    29412941            sage: Graph(2).blocks_and_cut_vertices()
    29422942            Traceback (most recent call last):
    29432943            ...
     
    29612961        s = self.vertex_iterator().next() # source
    29622962
    29632963        if len(self) == 1: # only one vertex
    2964             return [s],[s]
     2964            return [s],[]
    29652965
    29662966        if not self.is_connected():
    29672967            raise NotImplementedError("Blocks and cut vertices is currently only implemented for connected graphs.")