assert "Warning: no hard-coded metrics for" not in stderr, \
"incorrect warning triggered"
+def test_2179_1():
+ """
+ processing a label with a line containing only a space should not yield a
+ warning
+ https://gitlab.com/graphviz/graphviz/-/issues/2179
+ """
+
+ # a graph containing a label with a line containing only a space
+ input = 'digraph "" {\n' \
+ ' 0 -> 1 [fontname="Lato",label=< <br/>1>]\n' \
+ '}'
+
+ # run a graph with an empty label through Graphviz
+ with subprocess.Popen(["dot", "-Tsvg", "-o", os.devnull],
+ stdin=subprocess.PIPE, stderr=subprocess.PIPE,
+ universal_newlines=True) as p:
+ _, stderr = p.communicate(input)
+
+ assert p.returncode == 0
+
+ assert "Warning: no hard-coded metrics for" not in stderr, \
+ "incorrect warning triggered"
+
def test_2185_1():
"""
GVPR should deal with strings correctly