diff --git a/conftest.py b/conftest.py new file mode 100644 index 000000000..657726394 --- /dev/null +++ b/conftest.py @@ -0,0 +1,19 @@ +import json + +def pytest_runtest_makereport(item, call): + try: + # Récupère tout ce qui est intéressant dans item + info = { + 'nodeid': item.nodeid, + 'name': getattr(item, 'name', None), + 'keywords': list(getattr(item, 'keywords', {}).keys()), + 'callspec': dict(item.callspec.params) if hasattr(item, "callspec") else None, + 'user_properties': getattr(item, 'user_properties', None), + 'fixtureinfo': str(getattr(item, 'fixturenames', None)), + # Ajoute d'autres attributs ici si tu veux + } + with open("ci-reports/markdown/pytest_item_dump.txt", "a") as f: + f.write(json.dumps(info, indent=2, default=str) + "\n\n") + except Exception as e: + with open("ci-reports/markdown/pytest_item_dump.txt", "a") as f: + f.write(f"ERROR in pytest_runtest_makereport for {getattr(item, 'nodeid', '??')}: {e}\n")