summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2014-11-25 03:44:22 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2014-11-25 04:06:15 +0100
commitb65b23f37a17b7d695b65e0b0d3c9ef8945856e9 (patch)
tree34018ecbd66e899ae2c2766071b6edf79b454198 /testsuite
parentc544b18a985edd7444593e75ad52483f4842c119 (diff)
downloadbcfg2-b65b23f37a17b7d695b65e0b0d3c9ef8945856e9.tar.gz
bcfg2-b65b23f37a17b7d695b65e0b0d3c9ef8945856e9.tar.bz2
bcfg2-b65b23f37a17b7d695b65e0b0d3c9ef8945856e9.zip
Bcfg2/Options/Parser: fix --version option, add test
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/Testsrc/Testlib/TestOptions/TestOptions.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/Testsrc/Testlib/TestOptions/TestOptions.py b/testsuite/Testsrc/Testlib/TestOptions/TestOptions.py
index a2dc8ffe2..034a4580a 100644
--- a/testsuite/Testsrc/Testlib/TestOptions/TestOptions.py
+++ b/testsuite/Testsrc/Testlib/TestOptions/TestOptions.py
@@ -185,6 +185,13 @@ class TestBasicOptions(OptionTestCase):
options = self._test_options(env={"TEST_PATH_OPTION": "/foo"})
self.assertEqual(options.test_path_option, "/foo")
+ def test_version(self):
+ """print version and exit on --version"""
+ self.assertRaises(
+ SystemExit,
+ self._test_options,
+ options=['--version'])
+
def test_set_boolean_in_cli(self):
"""set boolean options in CLI options."""
# passing the option yields the reverse of the default, no