Skip to content

Commit 42054a5

Browse files
committed
Do not handle Tags as list in envirnoment table
1 parent 103c849 commit 42054a5

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__
@@ -566,7 +566,7 @@ def _generate_environment(self, config):
566566
value = metadata[key]
567567
if isinstance(value, str) and value.startswith("http"):
568568
value = html.a(value, href=value, target="_blank")
569-
elif isinstance(value, (list, tuple, set)):
569+
elif isinstance(value, (list, tuple, set)) and not isinstance(value, Tag):
570570
value = ", ".join(str(i) for i in sorted(map(str, value)))
571571
elif isinstance(value, dict):
572572
sorted_dict = {k: value[k] for k in sorted(value)}

0 commit comments

Comments
 (0)