From 3dd40edfb0b952790367129794c490d731344d40 Mon Sep 17 00:00:00 2001 From: aceisace Date: Thu, 14 Apr 2022 17:14:30 +0200 Subject: [PATCH] improve testing --- inkycal/tests/main_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inkycal/tests/main_test.py b/inkycal/tests/main_test.py index 24292ef..54804ef 100644 --- a/inkycal/tests/main_test.py +++ b/inkycal/tests/main_test.py @@ -60,16 +60,16 @@ test_config = """ class ModuleTest(unittest.TestCase): @staticmethod def test_without_rendering(): - # Create temporary json settings file with the config from above - with open('dummy.json', mode="w") as file: - file.write(test_config) + # Check if settings.json file exists in current directory + if not os.path.exists("settings.json"): + # Create temporary json settings file with the config from above + with open('settings.json', mode="w") as file: + file.write(test_config) print('testing Inkycal in non-render-mode...', end="") - inky = Inkycal('dummy.json', render=False) + inky = Inkycal('settings.json', render=False) inky.test() print('OK') - os.remove('dummy.json') - if __name__ == '__main__': unittest.main()