Closed hugovk closed 8 years ago
Thanks for this. I wasn't sure how to go about unit-testing for this project but this looks like a great start.
I hope to find some time later today to investigate it properly. My initial thoughts:
SYMBOLS
. Is that right? (I'm not experienced with measuring code coverage, so I'm not sure how this works.)coverage
?)At a glance, coverage/Coveralls seems to ignore the ~100 lines of code that define SYMBOLS. Is that right? (I'm not experienced with measuring code coverage, so I'm not sure how this works.)
Looks like coverage counts SYMBOLS
as a single, covered line. Line 222 is green (covered), the rest are ignored:
https://coveralls.io/jobs/13671203/source_files/260672864#L222
(The local output of coverage html
agrees.)
There's a lot of stuff added to the .gitignore file. Is much of this needed for testing? I'd rather keep .gitignore to the minimum required for the project.
The .gitignore has the common Python things from https://github.com/github/gitignore/blob/master/README.md added, but the least needed for coverage is only to ignore .coverage and htmlcov/. Would you like me trim that back down and only add those needed ones?
If it all works, I'd like to write more unit tests. Would it be possible to put test_see.py in a tests directory and run that directory as a test suite? (Edited to add: would this approach also work with coverage?)
Yes, that's possible, and it also works with coverage. Would you like me to refactor it like that?
Yes please to the .gitignore and test refactoring. :)
I've made some changes so that the unit tests and coverage can also be run locally (using make test
).
I'm happy to merge this in now. Thanks again!
Good stuff, happy to help out!
python test_see.py
without coverage; orcoverage run --source=see ./test_see.py -v
with coverage. Thecoverage report
shows the results, orcoverage html
to generate local files in htmlcov/TODO Before merge, please will you enable the araile/see repo at: