diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test_cfg.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/test_cfg.py b/tests/unit/test_cfg.py index 0b5ee46..7763e75 100644 --- a/tests/unit/test_cfg.py +++ b/tests/unit/test_cfg.py @@ -196,6 +196,18 @@ class CliOptsTestCase(BaseTestCase): self.assertEquals(self.conf.config_file, paths) + def test_disable_interspersed_args(self): + self.conf.register_cli_opt(BoolOpt('foo')) + self.conf.register_cli_opt(BoolOpt('bar')) + + args = ['--foo', 'blaa', '--bar'] + + self.assertEquals(self.conf(args), args[1:2]) + self.conf.disable_interspersed_args() + self.assertEquals(self.conf(args), args[1:]) + self.conf.enable_interspersed_args() + self.assertEquals(self.conf(args), args[1:2]) + class ConfigFileOptsTestCase(BaseTestCase): |
