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)
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)
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)
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)
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)
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)
def display(self): "Display a graph page locally." display_page(_Page(self))
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)
def display(self): "Display a graph page locally." display_page(_Page(self))
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)