This commit is contained in:
@@ -8,6 +8,7 @@ import pytest
|
||||
from pytest import ExitCode
|
||||
import traceback
|
||||
|
||||
'''
|
||||
def stringify(obj):
|
||||
if obj is None or obj == "":
|
||||
return "None"
|
||||
@@ -16,7 +17,17 @@ def stringify(obj):
|
||||
if isinstance(obj, dict):
|
||||
return '\n'.join(f"{k}: {stringify(v)}" for k, v in obj.items())
|
||||
return str(obj)
|
||||
'''
|
||||
|
||||
def stringify(obj):
|
||||
if obj is None or obj == "":
|
||||
return "`None`"
|
||||
if isinstance(obj, list):
|
||||
return ', '.join(stringify(e) for e in obj)
|
||||
if isinstance(obj, dict):
|
||||
return ', '.join(f"`{k}: {stringify(v)}`" for k, v in obj.items())
|
||||
return f"`{str(obj)}`"
|
||||
|
||||
def normalize_nodeid(nodeid):
|
||||
"""Convert pytest nodeid to Allure fullName format"""
|
||||
match = re.match(r"(tests[/\\].+?)\.py::(.+?)(?:\[.*)?$", nodeid)
|
||||
|
||||
Reference in New Issue
Block a user