This commit is contained in:
+1
-14
@@ -74,27 +74,17 @@ def serialize_callspec_between_getparam_and_setmulti(callspec):
|
||||
|
||||
selected_attrs = attributes[start_index:end_index]
|
||||
data = {}
|
||||
|
||||
for attr in selected_attrs:
|
||||
if attr != "indices":
|
||||
try:
|
||||
value = getattr(callspec, attr)
|
||||
if callable(value):
|
||||
continue
|
||||
|
||||
# Forcer la sérialisation propre du champ 'params'
|
||||
if attr == "params" and isinstance(value, dict):
|
||||
value = {str(k): safe_serialize(v) for k, v in value.items()}
|
||||
else:
|
||||
value = safe_serialize(value)
|
||||
|
||||
data[attr] = value
|
||||
data[attr] = safe_serialize(value)
|
||||
except Exception:
|
||||
data[attr] = "<error>"
|
||||
|
||||
return data
|
||||
|
||||
|
||||
runtime_params = []
|
||||
|
||||
def pytest_runtest_makereport(item, call):
|
||||
@@ -115,6 +105,3 @@ def pytest_sessionfinish(session, exitstatus):
|
||||
os.makedirs("ci-reports/markdown", exist_ok=True)
|
||||
with open("ci-reports/markdown/runtime_params.json", "w") as f:
|
||||
json.dump(runtime_params, f, indent=2)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user