From 9fd1da1819a05bff079dcdecc1722133cedd00ed Mon Sep 17 00:00:00 2001 From: A_D Date: Mon, 23 Nov 2020 08:57:49 +0200 Subject: [PATCH] Added space workaround to test_list --- tests/test_config.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_config.py b/tests/test_config.py index 28c0bb3a..3ce889b2 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -170,7 +170,12 @@ class TestOldNewConfig: @mark.parametrize("lst", _build_test_list(list_tests, _get_fuzz(list))) def test_list(self, lst): - lst = [x.replace("\r", "") for x in lst] + lst = [x.replace("\r", "") for x in lst] # OldConfig on linux fails to store these correctly + if sys.platform == 'win32': + # old conf on windows replaces empty entries with spaces as a workaround for a bug. New conf does not + # So insert those spaces here, to ensure that it works otherwise. + lst = [e if len(e) > 0 else ' ' for e in lst] + name = self.KEY_PREFIX + f'list_test_{ hash("".join(lst)) }' old_config.set(name, lst) old_config.save()