Merge lp:~allenap/launchpad/config-dir into lp:launchpad
Proposed by
Gavin Panella
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13972 |
Proposed branch: | lp:~allenap/launchpad/config-dir |
Merge into: | lp:launchpad |
Diff against target: |
175 lines (+61/-24) 2 files modified
lib/canonical/config/__init__.py (+24/-10) lib/canonical/config/tests/test_config.py (+37/-14) |
To merge this branch: | bzr merge lp:~allenap/launchpad/config-dir |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | Approve | ||
Review via email: mp+75737@code.launchpad.net |
Commit message
[r=adeuring][no-qa] Add support for dir() and iter() to CanonicalConfig.
Description of the change
This adds support for dir() and iter() to CanonicalConfig. This means that it's easier, during development, to see what configuration keys are set, and to drill down. The dir() support is especially useful because it means that tab completion will work on configuration keys.
To post a comment you must log in.
Look good. Just one suggestion:
+ def test_iter(self): config. config l(set(config. _config) , set(config))
+ # iter(config) returns an iterator of config sections.
+ config = canonical.
+ self.assertEqua
The comment included, the word "config" appears eight times ;) Makes it a bit hard to understand what exact the test does. What about
sections = set(config._config) l(sections, set(config))
self.assertEqua