Skip to content

Commit

Permalink
Fix _test_visualize.py twisted import errors
Browse files Browse the repository at this point in the history
When graphviz modules are installed but not twisted, this creates test failures
due to _visualize.py importing _discover.py which hard depends on twisted being installed.

Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
  • Loading branch information
dol-sen committed Jun 10, 2020
1 parent 3ebdb40 commit 2122102
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions automat/_test/test_visualize.py
Expand Up @@ -62,6 +62,7 @@ def out(self):


@skipIf(not isGraphvizModuleInstalled(), "Graphviz module is not installed.")
@skipIf(not isTwistedInstalled(), "Twisted is not installed.")
class ElementMakerTests(TestCase):
"""
L{elementMaker} generates HTML representing the specified element.
Expand Down Expand Up @@ -134,6 +135,7 @@ def isLeaf(element):


@skipIf(not isGraphvizModuleInstalled(), "Graphviz module is not installed.")
@skipIf(not isTwistedInstalled(), "Twisted is not installed.")
class TableMakerTests(TestCase):
"""
Tests that ensure L{tableMaker} generates HTML tables usable as
Expand Down Expand Up @@ -214,6 +216,7 @@ def hasCorrectColspan(element):

@skipIf(not isGraphvizModuleInstalled(), "Graphviz module is not installed.")
@skipIf(not isGraphvizInstalled(), "Graphviz tools are not installed.")
@skipIf(not isTwistedInstalled(), "Twisted is not installed.")
class IntegrationTests(TestCase):
"""
Tests which make sure Graphviz can understand the output produced by
Expand All @@ -232,6 +235,7 @@ def test_validGraphviz(self):


@skipIf(not isGraphvizModuleInstalled(), "Graphviz module is not installed.")
@skipIf(not isTwistedInstalled(), "Twisted is not installed.")
class SpotChecks(TestCase):
"""
Tests to make sure that the output contains salient features of the machine
Expand Down

0 comments on commit 2122102

Please sign in to comment.