diff options
Diffstat (limited to 'test/unittest_configuration.py')
-rw-r--r-- | test/unittest_configuration.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/unittest_configuration.py b/test/unittest_configuration.py index f59a0e0..ea7cdca 100644 --- a/test/unittest_configuration.py +++ b/test/unittest_configuration.py @@ -469,6 +469,22 @@ class RegrTC(TestCase): self.linter.load_command_line_configuration([]) self.assertEqual(self.linter.config.profile, False) + def test_register_options_multiple_groups(self): + """ensure multiple option groups can be registered at once""" + config = Configuration() + self.assertEqual(config.options, ()) + new_options = ( + ('option1', {'type': 'string', 'help': '', + 'group': 'g1', 'level': 2}), + ('option2', {'type': 'string', 'help': '', + 'group': 'g1', 'level': 2}), + ('option3', {'type': 'string', 'help': '', + 'group': 'g2', 'level': 2}), + ) + config.register_options(new_options) + self.assertEqual(config.options, new_options) + + class MergeTC(TestCase): def test_merge1(self): |