Exemplo n.º 1
0
def test_fixedfont():
    from dotviewer import graphpage, graphclient
    class MyPage(graphpage.DotFileGraphPage):
        fixedfont = True
    dotfile = udir.join('graph1.dot')
    page = MyPage(str(dotfile))
    page.fixedfont = True
    graphclient.display_page(page)
Exemplo n.º 2
0
def test_ensure_readable():
    from dotviewer import graphpage, graphclient
    tmpname = udir.join("graph5.dot")
    tmpname.write('''digraph f {
        node1 [shape="box", label="readable???", color="black", fillcolor="black", style="filled"];
    }''')
    page = graphpage.DotFileGraphPage(str(tmpname))
    graphclient.display_page(page)
Exemplo n.º 3
0
def test_fixedfont():
    from dotviewer import graphpage, graphclient
    class MyPage(graphpage.DotFileGraphPage):
        fixedfont = True
    dotfile = str(udir.join(FILENAME))
    page = MyPage(dotfile)
    page.fixedfont = True
    graphclient.display_page(page)
Exemplo n.º 4
0
 def display(self):
     "Display a graph page."
     from dotviewer import graphclient, msgstruct
     try:
         graphclient.display_page(self, save_tmp_file=self.save_tmp_file)
     except msgstruct.RemoteError as e:
         import sys
         print >> sys.stderr, "Exception in the graph viewer:", str(e)
Exemplo n.º 5
0
def test_colors():
    from dotviewer import graphpage, graphclient
    class MyPage(graphpage.DotFileGraphPage):
        def compute(self, dotfile):
            super(MyPage, self).compute(dotfile)
            self.links = {'v2721': 'Hello world',
                          'v2720': ('Something green', (0, 192, 0)),
                          }
    dotfile = udir.join('graph1.dot')
    page = MyPage(str(dotfile))
    graphclient.display_page(page)
Exemplo n.º 6
0
def test_colors():
    from dotviewer import graphpage, graphclient
    class MyPage(graphpage.DotFileGraphPage):
        def compute(self, dotfile):
            super(MyPage, self).compute(dotfile)
            self.links = {'v2721': 'Hello world',
                          'v2720': ('Something green', (0, 192, 0)),
                          }
    dotfile = str(udir.join(FILENAME))
    page = MyPage(dotfile)
    graphclient.display_page(page)
Exemplo n.º 7
0
 def display(self):
     "Display a graph page locally."
     display_page(_Page(self))
Exemplo n.º 8
0
def test_linewidth():
    udir.join("graph2.dot").write(SOURCE2)
    from dotviewer import graphpage, graphclient
    dotfile = udir.join('graph2.dot')
    page = graphpage.DotFileGraphPage(str(dotfile))
    graphclient.display_page(page)
Exemplo n.º 9
0
 def display(self):
     "Display a graph page locally."
     display_page(_Page(self))
Exemplo n.º 10
0
def test_linewidth():
    udir.join("graph2.dot").write(SOURCE2)
    from dotviewer import graphpage, graphclient
    dotfile = udir.join('graph2.dot')
    page = graphpage.DotFileGraphPage(str(dotfile))
    graphclient.display_page(page)