Closed
Bug 678968
Opened 15 years ago
Closed 13 years ago
new_conf config_manager test coverage
Categories
(Socorro :: Infra, task)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: peterbe, Unassigned)
Details
Attachments
(1 file)
|
340.25 KB,
text/html
|
Details |
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"
| Reporter | ||
Comment 1•15 years ago
|
||
This is just a sample coverage report page. Just for the config_manager.py module.
| Reporter | ||
Comment 2•15 years ago
|
||
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:
$ gorun.py
and it runs the tests over and over in a terminal.
[https://github.com/peterbe/python-gorun/]
| Reporter | ||
Comment 3•15 years ago
|
||
(In reply to Peter Bengtsson [:peterbe] from comment #2)
> 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"
>
Typo!
Replace "testConfigurationManager2" with testConfigurationManager"
| Reporter | ||
Comment 4•15 years ago
|
||
Instead of uploading a patch (because I've already committed it in the new_conf branch) see here:
http://code.google.com/p/socorro/source/detail?r=3449
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.
| Reporter | ||
Comment 5•14 years ago
|
||
For what it's worth, development has moved here:
https://github.com/twobraids/configman
As of now, the code is 100% independent of Socorro. Has 68% test coverage, needs some more restructuring (tests directory, setup.py file)
| Assignee | ||
Updated•14 years ago
|
Component: Socorro → General
Product: Webtools → Socorro
Updated•14 years ago
|
Component: General → Infra
| Reporter | ||
Comment 6•13 years ago
|
||
We have since moved properly to configman.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•