The goal is to have near 100% test coverage over the new config_manager.py in the new_conf branch before we start refactoring too much and consider new features within.
The test coverage is currently 71% (see attached last output from coverage report). The command I use to generate this is:
socorro@lucid64:~/dev/new_conf$ nosetests -s socorro.unittest.lib.testConfigurationManager:TestCase --with-cover --cover-html --cover-package="socorro.lib.config_manager"
Created attachment 553153 [details]
Sample coverage analysis
This is just a sample coverage report page. Just for the config_manager.py module.
Note to self/Lars: The tool I use to run tests is [python-gorun] which works great on Linux. Inside the directory ~/dev/new_conf I have a file called "gorun_settings.py" which currently looks like this::
DIRECTORIES = (
('', 'nosetests -s socorro.unittest.lib.testConfigurationManager2:TestCase.test_create_ConfigurationManager_with_use_config_files'),
# ('', 'nosetests -s socorro.unittest.lib.testConfigurationManager2:TestCase'),
#nosetests -s socorro.unittest.lib.testConfigurationManager2:TestCase --with-cover --cover-html --cover-package="socorro.lib.config_manager"
That makes it possible for me to just start gorun:
and it runs the tests over and over in a terminal.
(In reply to Peter Bengtsson [:peterbe] from comment #2)
> DIRECTORIES = (
> ('', 'nosetests -s
> # ('', 'nosetests -s
> #nosetests -s socorro.unittest.lib.testConfigurationManager2:TestCase
> --with-cover --cover-html --cover-package="socorro.lib.config_manager"
Replace "testConfigurationManager2" with testConfigurationManager"
Instead of uploading a patch (because I've already committed it in the new_conf branch) see here:
I'm currently stuck on tests that use `ConfigManager(..., use_config_files=True, ...)` because they need to wrap this `_application` stuff which I haven't really understood yet.
For what it's worth, development has moved here:
As of now, the code is 100% independent of Socorro. Has 68% test coverage, needs some more restructuring (tests directory, setup.py file)
We have since moved properly to configman.