From 2ea9851bcb72753d5c243d352fda5e3164dc04b5 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 30 Jul 2024 15:37:00 -0700 Subject: [PATCH] add additional sorting to result comparison --- tests/test_ipr/test_upload.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_ipr/test_upload.py b/tests/test_ipr/test_upload.py index 58d7645..06ea15e 100644 --- a/tests/test_ipr/test_upload.py +++ b/tests/test_ipr/test_upload.py @@ -166,6 +166,8 @@ def compare_sections(section1, section2): item[subitem].pop(key, None) if isinstance(item[subitem], list): [subsubitem.pop(key, None) for subsubitem in item[subitem]] + if item[subitem] != []: + item[subitem] = sorted(item[subitem], key=lambda d: str(d)) if isinstance(section1, list): section2_items = [str(item) for item in section2] section2_items.sort()