From 6ae5e14ccb191612183e8c519b9cc2473323ba54 Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI <amir.mohammadi@idiap.ch> Date: Fri, 29 Apr 2022 15:08:46 +0200 Subject: [PATCH] make click output tests more relaxed --- bob/extension/test_click_helper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bob/extension/test_click_helper.py b/bob/extension/test_click_helper.py index e3ae2f6..e5f0c73 100644 --- a/bob/extension/test_click_helper.py +++ b/bob/extension/test_click_helper.py @@ -192,6 +192,9 @@ def _assert_config_dump(ref, ref_date): with open("TEST_CONF", "r") as f, open(ref, "r") as f2: text = f.read().replace("'''", '"""') ref_text = f2.read().replace(ref_date, today) + # remove the starting whitespace of each line so the tests are more relaxed + text = "\n".join(line.lstrip() for line in text.splitlines()) + ref_text = "\n".join(line.lstrip() for line in ref_text.splitlines()) assert text == ref_text, "\n".join( [text, "########################\n" * 2, ref_text] ) -- GitLab