Browse Source

bug #1819: Add testcase for --no-kill and -i options handling

Mukund Sivaraman 13 years ago
parent
commit
d2661eddfc
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/bin/bind10/tests/bind10_test.py.in

+ 10 - 0
src/bin/bind10/tests/bind10_test.py.in

@@ -1012,6 +1012,16 @@ class TestParseArgs(unittest.TestCase):
         options = parse_args(['--config-file=config-file'], TestOptParser)
         self.assertEqual('config-file', options.config_file)
 
+    def test_nokill(self):
+        options = parse_args([], TestOptParser)
+        self.assertEqual(False, options.nokill)
+        options = parse_args(['--no-kill'], TestOptParser)
+        self.assertEqual(True, options.nokill)
+        options = parse_args([], TestOptParser)
+        self.assertEqual(False, options.nokill)
+        options = parse_args(['-i'], TestOptParser)
+        self.assertEqual(True, options.nokill)
+
     def test_cmdctl_port(self):
         """
         Test it can parse the command control port.