summaryrefslogtreecommitdiffstats
path: root/testsuite/Testsrc/Testlib/TestOptions
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestOptions')
-rw-r--r--testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py b/testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py
index 78acadf1f..4277c8efe 100644
--- a/testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py
+++ b/testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py
@@ -45,6 +45,10 @@ class TestConfigFiles(OptionTestCase):
inner1()
@mock.patch("os.path.exists", mock.Mock(return_value=False))
- def test_no_config_file(self):
+ @make_config()
+ def test_no_config_file(self, config):
"""fail to read config file."""
- self.assertRaises(SystemExit, self.parser.parse, [])
+ try:
+ self.parser.parse(['-C', config])
+ except SystemExit:
+ self.fail('Missing config file should not raise SystemExit')