summaryrefslogtreecommitdiff
path: root/cliapp/settings_tests.py
AgeCommit message (Collapse)AuthorFilesLines
2017-08-19Add: Python3 supportLars Wirzenius1-34/+38
2015-12-26Give better error message if YAML config is badLars Wirzenius1-0/+1
2015-12-23Add support for YAML config filesLars Wirzenius1-8/+150
INI files continue to be supported, too.
2015-08-29Fix whitespace, line lengthLars Wirzenius1-1/+2
2015-08-29Allow comma in StringListSetting valuesJan Gerber1-2/+5
- Escape values with comma with double quotes in config syntax. - Don't split values passed as arguments.
2015-05-01Whitespace fixes for PEP8Lars Wirzenius1-6/+6
2015-04-18Add running of pylint in 'make check' and fix thingsLars Wirzenius1-19/+17
2015-04-18Run pep8 in "make check" and fix so it passesLars Wirzenius1-2/+1
2013-12-06Make Settings.require accept many argumentsLars Wirzenius1-0/+12
Written-by: Stephen Judd <stephenj@catalyst.net.nz>
2013-10-30Nicely report unknown variables in config filesLars Wirzenius1-0/+13
Previously we would just raise an ugly exception, now there's a clear error message.
2013-06-09Remove trailing whitespace from ends of linesLars Wirzenius1-26/+26
2012-12-11Add --no-foo for every boolean --fooLars Wirzenius1-1/+11
2012-02-23Merge changes from elsewhereLars Wirzenius1-1/+11
2012-02-22Add a plugin systemLars Wirzenius1-1/+1
This code was originally written separately, which is why there's no history of it in the cliapp version control repository. The code is derived from code I wrote for obnam.
2012-02-22Add settings groupsLars Wirzenius1-1/+1
2012-02-22Make Settings act a bit more like a dict.Lars Wirzenius1-0/+10
Thanks to Jannis Pohlmann for giving the inpiration for this change.
2012-02-11Make as_cp retain all sections from config filesLars Wirzenius1-0/+20
2012-02-11Add as_cp method to return settings values as a ConfigParserLars Wirzenius1-0/+8
2012-01-11fix setting booleans to false in config filesLars Wirzenius1-0/+14
2011-09-27Change license to be GPL version 2 or later.Lars Wirzenius1-5/+6
2011-08-29Add test case for desired behavior of options overriding values from config ↵Lars Wirzenius1-0/+17
files.
2011-08-02Add test for --no-default-configs --config=foo.Lars Wirzenius1-0/+4
2011-08-02Add --no-default-configs.Lars Wirzenius1-0/+4
2011-08-02Add --config option.Lars Wirzenius1-0/+5
Had to change self.config_files to set the _config_files attribute to _default_config_files, if it was unset. This was necessary because otherwise any changes we made to it with .append(foo) would not be persistent. It also means that re-reading the config files does not happen.
2011-07-27Add a couple of tests for config files and defaults handling.Lars Wirzenius1-0/+30
2011-07-27Fix parsing of string_list values in config files.Lars Wirzenius1-0/+16
2011-07-18Allow usage to be a func, for deferred evaluation.Lars Wirzenius1-0/+5
2011-06-26Add test for verifying booleans are false by default.Lars Wirzenius1-0/+4
2011-06-19Add cliapp.Settings.require method.Lars Wirzenius1-0/+43
2011-06-12Use newer API for adding settings.Lars Wirzenius1-21/+21
2011-06-11Fix string lists to have a sensible default value handling.Lars Wirzenius1-0/+10
Previously, if you set a default value for a string list setting, the user's settings were appended to it. Now the default is used if the user does not specify the setting at all (same as before), but ignored if the user does specify. Thus, if the default for foo was ['bar'], then --foo=pink now results in ['pink'], rather than ['bar', 'pink'].
2011-05-29Fix tests to handle renamed _listconfs method.Lars Wirzenius1-3/+3
2011-05-29Update docs for settings.py.Lars Wirzenius1-3/+3
This included adjusting things so that methods that are not meant to be public are not public.
2011-03-12Add Settings.load_configs.Lars Wirzenius1-0/+20
2011-03-12Add Settings.config_files attribute.Lars Wirzenius1-0/+9
2011-03-12Make Settings.listconfs sort the filenames.Lars Wirzenius1-0/+6
Need to figure out a way to sort things independent of locale.
2011-03-12Add Settings.listconfs and Settings.default_config_files.Lars Wirzenius1-0/+14
2011-03-11Fix boolean options.Lars Wirzenius1-0/+20
2011-03-11Add test for choice options with bad values.Lars Wirzenius1-0/+6
2011-03-11Add tests for get/setitem and KeyError, and fix getitem to raise it.Lars Wirzenius1-0/+6
2011-03-11Refactor Settings to use ConfigParser to store values.Lars Wirzenius1-25/+0
This will be useful when we add config file support.
2011-03-11Test for default settings the right way.Lars Wirzenius1-4/+4
--version and --help are not really settings, but we check for them anyway.
2011-03-11Add Settings.version and Settings.progname.Lars Wirzenius1-0/+12
Setting progname also sets it in the option parser. Setting version is not possible, since OptionParser does not allow it.
2011-03-11Make 'settingname in settings' work.Lars Wirzenius1-0/+9
2011-03-11Use Settings in Application.Lars Wirzenius1-1/+1
2011-03-11Create a new Settings class to hold settings.Lars Wirzenius1-0/+151