Commit graph

8 commits

Author SHA1 Message Date
Neil Booth
39fe24b4d3 Rename auto_cycle to auto_connect in config
User config is updated if appropriate.
Add tests behaviour is as expected.
Just the one rename-it reference to auto_cycle remains.
2015-05-25 16:18:52 +09:00
Neil Booth
e20dfcd3eb Fix SimpleConfig
SimpleConfig claims to handle configuration options in priority
command line, user config, system config, which makes sense.
In fact it appears it used priority command line, system config,
user config.
Also, from the priority ordering, it would seem correct that a
value should be unmodifiable if and only if it's set on the command
line.  Previously anything in the system config would be unmodifiable.

This patch fixes these and cleans the code up a bit.  I noticed this
whilst attempting to unify the 'auto_cycle' setting.

Fixup tests accordingly.
2015-05-25 15:16:19 +09:00
Chris Glass
b2f8d507de Fixed docstrings 2014-06-26 13:24:14 +02:00
Chris Glass
99a31b0c6a Fixes previously introduced bug
The passed in command line options were saved to the user config.
2014-06-26 13:22:02 +02:00
Chris Glass
34f0a65c49 Added more tests for user config parsing. 2014-06-26 11:08:13 +02:00
Chris Glass
ad3640d7a4 Added tests for the system config function. 2014-06-26 10:08:00 +02:00
Chris Glass
5eeae69425 Added more tests for edge cases. 2014-06-25 18:04:37 +02:00
Chris Glass
fff3ed9b77 Added a lot of tests for SimpleConfig
Refactored the SImpleConfig class a lot to make sure the behavior is
always defined.
2014-06-25 17:34:51 +02:00