diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2012-11-23 20:25:12 +0000 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2012-11-23 20:25:55 +0000 |
| commit | 4b636dc65adce613f394c4ba5c0724c2f9fedc9f (patch) | |
| tree | 3ae7ad31814710b5c88fa94f37d719ee00108294 | |
| parent | b4c0767e5529eb5d58aed90643354dbee83efefe (diff) | |
Add another duplicate opt test case
This gets the code coverage of the tests back up to 100%.
Change-Id: I737c1cfa52d10b3813237a9cb88b15211e0872c1
| -rw-r--r-- | tests/unit/test_cfg.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/test_cfg.py b/tests/unit/test_cfg.py index 384a57a..95c93ae 100644 --- a/tests/unit/test_cfg.py +++ b/tests/unit/test_cfg.py @@ -1331,6 +1331,11 @@ class SadPathTestCase(BaseTestCase): self.assertTrue(hasattr(self.conf, 'foo')) self.assertEquals(self.conf.foo, None) + def test_error_duplicate(self): + self.conf.register_cli_opt(StrOpt('foo', help='bar')) + self.assertRaises(DuplicateOptError, + self.conf.register_cli_opt, StrOpt('foo')) + def test_error_duplicate_with_different_dest(self): self.conf.register_cli_opt(StrOpt('foo', dest='f')) self.conf.register_cli_opt(StrOpt('foo')) |
