Skip to content

Commit 4552a23

Browse files
werdeilVincent VERDEIL
authored andcommitted
Do not handle Tags as list in envirnoment table
1 parent f0fbe2a commit 4552a23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytest_html/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# ansi2html is not installed
2626
ANSI = False
2727

28-
from py.xml import html, raw
28+
from py.xml import html, raw, Tag
2929

3030
from . import extras
3131
from . import __version__, __pypi_url__
@@ -571,7 +571,7 @@ def _generate_environment(self, config):
571571
value = metadata[key]
572572
if isinstance(value, str) and value.startswith("http"):
573573
value = html.a(value, href=value, target="_blank")
574-
elif isinstance(value, (list, tuple, set)):
574+
elif isinstance(value, (list, tuple, set)) and not isinstance(value, Tag):
575575
value = ", ".join(str(i) for i in sorted(map(str, value)))
576576
elif isinstance(value, dict):
577577
sorted_dict = {k: value[k] for k in sorted(value)}

0 commit comments

Comments
 (0)