summarylogtreecommitdiffstats
path: root/backport_Fix_test_visualize.py_twisted_import_errors.patch
blob: 7514c76a0bb14de5fa66f793ebcc8113d940ffa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 2122102220d8542dd63022809ac297a155714176 Mon Sep 17 00:00:00 2001
From: Brian Dolbec <dolsen@gentoo.org>
Date: Wed, 10 Jun 2020 07:31:45 -0700
Subject: [PATCH] Fix _test_visualize.py twisted import errors

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>
---
 automat/_test/test_visualize.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/automat/_test/test_visualize.py b/automat/_test/test_visualize.py
index 987eb3c..142c4bf 100644
--- a/automat/_test/test_visualize.py
+++ b/automat/_test/test_visualize.py
@@ -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.
@@ -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
@@ -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
@@ -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