summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2016-09-28 21:10:31 +0200
committerAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2016-09-28 21:10:31 +0200
commit078a913ad179c12860aaafd5d8a75fa187ef0670 (patch)
tree817a8a30f6399d2bba9d2c73f9dec657cfd9ca98
parent2fe3015d986bc27bfd230d447ff9ba1c7cb946ce (diff)
downloadbcfg2-078a913ad179c12860aaafd5d8a75fa187ef0670.tar.gz
bcfg2-078a913ad179c12860aaafd5d8a75fa187ef0670.tar.bz2
bcfg2-078a913ad179c12860aaafd5d8a75fa187ef0670.zip
testsuite: Missing config file should not raise SystemExit anymore
-rw-r--r--testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py5
1 files changed, 4 insertions, 1 deletions
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')