From 078a913ad179c12860aaafd5d8a75fa187ef0670 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 28 Sep 2016 21:10:31 +0200 Subject: testsuite: Missing config file should not raise SystemExit anymore --- testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py') diff --git a/testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py b/testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py index 78acadf1f..6e2cda2c3 100644 --- a/testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py +++ b/testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py @@ -47,4 +47,7 @@ class TestConfigFiles(OptionTestCase): @mock.patch("os.path.exists", mock.Mock(return_value=False)) def test_no_config_file(self): """fail to read config file.""" - self.assertRaises(SystemExit, self.parser.parse, []) + try: + self.parser.parse() + except SystemExit: + self.fail('Missing config file should not raise SystemExit') -- cgit v1.2.3-1-g7c22