From 70ab16d953aa0b82ddcf7efef5462bc093c4443a Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauldmccarthy@gmail.com> Date: Fri, 14 Sep 2018 18:05:00 +0100 Subject: [PATCH] TEST: Expand Settings.writeConfigFile test --- tests/test_settings.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_settings.py b/tests/test_settings.py index c906c63ce..b17b1b87a 100644 --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -433,6 +433,15 @@ def test_writeConfigFile(): readback = pickle.load(f) assert testdata == readback + # should fail gracefuly + # if write is not possible + s = settings.Settings(cfgid='test', cfgdir=testdir, writeOnExit=False) + + # testdir has been removed, + # but call should not crash + s.writeConfigFile() + + def test_set(): -- GitLab