Skip to content

Commit

Permalink
clean test_pygraphviz
Browse files Browse the repository at this point in the history
  • Loading branch information
aleneum committed Mar 29, 2020
1 parent 4632e62 commit 5f5e58f
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions tests/test_pygraphviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
pass

from .utils import Stuff
from .test_graphviz import TestDiagrams, TestDiagramsNested, NestedState
from .test_graphviz import TestDiagrams, TestDiagramsNested
from transitions.extensions.states import add_state_features, Timeout, Tags
from unittest import skipIf
import tempfile
import os

try:
# Just to skip tests if graphviz not installed
Expand All @@ -25,34 +23,6 @@ class PygraphvizTest(TestDiagrams):
def setUp(self):
super(PygraphvizTest, self).setUp()

# def test_diagram(self):
# m = self.machine_cls(states=self.states, transitions=self.transitions, use_pygraphviz=self.use_pygraphviz,
# initial='A', auto_transitions=False, title='a test')
# graph = m.get_graph()
# self.assertIsNotNone(graph)
# self.assertTrue(graph.directed)
#
# # Test that graph properties match the Machine
# self.assertEqual(
# set(m.states.keys()), set([n.name for n in graph.nodes()]))
# triggers = set([n.attr['label'] for n in graph.edges()])
# for t in triggers:
# t = edge_label_from_transition_label(t)
# self.assertIsNotNone(getattr(m, t))
#
# self.assertEqual(len(graph.edges()), len(self.transitions))
#
# # write diagram to temp file
# target = tempfile.NamedTemporaryFile()
# graph.draw(target.name, prog='dot')
# self.assertTrue(os.path.getsize(target.name) > 0)
#
# # cleanup temp file
# target.close()
#
# graph = m.get_graph(force_new=True, title=False)
# self.assertEqual("", graph.graph_attr['label'])

def test_if_multiple_edges_are_supported(self):
transitions = [
['event_0', 'a', 'b'],
Expand Down

0 comments on commit 5f5e58f

Please sign in to comment.