[fix] indentation

pull/592/head
tessier 4 years ago
parent 5d1c64bea2
commit 68deaba85f

@ -191,10 +191,10 @@ class Diagram:
def render(self) -> None:
if isinstance(self.outformat, list):
for one_format in self.outformat:
self.dot.render(format=one_format, view=self.show, quiet=True)
for one_format in self.outformat:
self.dot.render(format=one_format, view=self.show, quiet=True)
else:
self.dot.render(format=self.outformat, view=self.show, quiet=True)
self.dot.render(format=self.outformat, view=self.show, quiet=True)
class Cluster:

@ -108,16 +108,16 @@ class DiagramTest(unittest.TestCase):
self.assertTrue(os.path.exists(f"{self.name}.png"))
def test_outformat_list(self):
"""Check that outformat render all the files from the list."""
self.name = 'diagrams_image'
with Diagram(show=False, outformat=["dot", "png"]):
Node("node1")
# both files must exist
self.assertTrue(os.path.exists(f"{self.name}.png"))
self.assertTrue(os.path.exists(f"{self.name}.dot"))
# clean the dot file as it only generated here
os.remove(self.name + ".dot")
"""Check that outformat render all the files from the list."""
self.name = 'diagrams_image'
with Diagram(show=False, outformat=["dot", "png"]):
Node("node1")
# both files must exist
self.assertTrue(os.path.exists(f"{self.name}.png"))
self.assertTrue(os.path.exists(f"{self.name}.dot"))
# clean the dot file as it only generated here
os.remove(self.name + ".dot")
class ClusterTest(unittest.TestCase):

Loading…
Cancel
Save