[tests/results] add workaround for 'identity' format fields

This commit is contained in:
Mike Fährmann
2026-01-06 19:02:48 +01:00
parent 0b3258430f
commit 223779f456

View File

@@ -534,6 +534,9 @@ class TestFormatter(formatter.StringFormatter):
return fmt(obj[key])
except KeyError:
return ""
elif "<function identity at " in repr(fmt):
def wrap(obj):
return "".join(obj[key])
else:
def wrap(obj):
return fmt(obj[key])
@@ -546,6 +549,9 @@ class TestFormatter(formatter.StringFormatter):
for func in funcs:
obj = func(obj)
return fmt(obj)
elif "<function identity at " in repr(fmt):
def wrap(obj):
return "".join(obj[key])
else:
def wrap(obj):
obj = obj[key]