Ticket #9739: trac_9739-graphviz.patch

File trac_9739-graphviz.patch, 1.1 KB (added by jhpalmieri, 9 years ago)

main Sage library repo

  • sage/graphs/generic_graph.py

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1315687702 25200
    # Node ID d5477d931065c74dc8c59112dae92c08b772a22d
    # Parent  6ff7964e53c8053b1ee01efa55bdf60e369dccbb
    #9739: in generic_graph.py, write temporary file to SAGE_TMP
    rather than SAGE_TESTDIR
    
    diff --git a/sage/graphs/generic_graph.py b/sage/graphs/generic_graph.py
    a b class GenericGraph(GenericGraph_pyx): 
    1414314143        EXAMPLES::
    1414414144       
    1414514145            sage: G = Graph({0:{1:None,2:None}, 1:{0:None,2:None}, 2:{0:None,1:None,3:'foo'}, 3:{2:'foo'}},sparse=True)
    14146             sage: G.graphviz_to_file_named(os.environ['SAGE_TESTDIR']+'/temp_graphviz',edge_labels=True)
    14147             sage: print open(os.environ['SAGE_TESTDIR']+'/temp_graphviz').read()
     14146            sage: tempfile = os.path.join(SAGE_TMP, 'temp_graphviz')
     14147            sage: G.graphviz_to_file_named(tempfile, edge_labels=True)
     14148            sage: print open(tempfile).read()
    1414814149            graph {
    1414914150              "0" [label="0"];
    1415014151              "1" [label="1"];