Skip to content
Snippets Groups Projects
Commit e288319c authored by vlorentz's avatar vlorentz
Browse files

test_checks: Make failure more readable

parent fb702b02
No related branches found
Tags v2.9.2
No related merge requests found
......@@ -6,6 +6,7 @@
# disable flake8 on this file because of line length
# flake8: noqa
import pprint
import re
import textwrap
from typing import Any, Dict
......@@ -243,7 +244,7 @@ _parameters1 = [
)
def test_api_checks_check_metadata_ok(metadata_ok, swh_checks_deposit):
actual_check, detail = check_metadata(ElementTree.fromstring(metadata_ok))
assert actual_check is True, f"Unexpected result: {detail}"
assert actual_check is True, f"Unexpected result:\n{pprint.pformat(detail)}"
if "swh:deposit" in metadata_ok:
# no missing suggested field
assert detail is None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment