Mercurial > public > mercurial-scm > hg-stable
diff tests/test-ui-config.py @ 34858:85a2db47ad50
configitems: adds a developer warning when accessing undeclared configuration
Now that all known options are declared, we setup a warning to make sure it will
stay this way.
We disable the warning in two tests checking other behavior with random options.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 16 Oct 2017 17:41:27 +0200 |
parents | 0ed730f3301c |
children | 3740d1abde44 |
line wrap: on
line diff
--- a/tests/test-ui-config.py Tue Oct 17 21:15:31 2017 +0200 +++ b/tests/test-ui-config.py Mon Oct 16 17:41:27 2017 +0200 @@ -6,6 +6,15 @@ ) testui = uimod.ui.load() + +# disable the configuration registration warning +# +# the purpose of this test is to check the old behavior, not to validate the +# behavior from registered item. so we silent warning related to unregisted +# config. +testui.setconfig('devel', 'warn-config-unknown', False, 'test') +testui.setconfig('devel', 'all-warnings', False, 'test') + parsed = dispatch._parseconfig(testui, [ 'values.string=string value', 'values.bool1=true',