Closed abingham closed 6 years ago
I am no entirely sure why coverage decreased. I added tests and documentation, so it seems like it could only increase, or at worst stay the same.
I think what happened is that reader.py
was not even imported previously, so its lines weren't included in the coverage statistics. So the new tests a) bring in a lot of new lines (reader.py) and b) only cover some of them. So the aggregate coverage statistic has gone down.
Looking at the coverage results, we can see that coverage stayed the same or got better in every file.
Yes, for some reason only files which are covered at all count towards coverage. I'll admit I don't understand the motivation for that.
I think I understand the motivation now. Basically, coverage.py only looks at code that's imported into the runtime. It doesn't try to guess which modules "should" be imported. So new tests which cause new modules to be imported cause the line count to go up. At least, that's my guess as to what's happening.
This adds a few tests along with some improvements to the
create_reader
docstring.