schema_salad
schema_salad copied to clipboard
improve test code coverage
python-coverage report
Name Stmts Miss Branch BrMiss Cover
---------------------------------------------------------------
schema_salad/__init__ 5 0 0 0 100%
schema_salad/__main__ 3 3 0 0 0%
schema_salad/aslist 4 0 2 0 100%
schema_salad/flatten 17 7 10 5 56%
schema_salad/jsonld_context 108 13 60 12 85%
schema_salad/main 148 53 48 24 61%
schema_salad/makedoc 311 274 168 165 8%
schema_salad/ref_resolver 395 80 261 66 78%
schema_salad/schema 212 33 136 30 82%
schema_salad/validate 133 27 103 31 75%
---------------------------------------------------------------
TOTAL 1336 490 788 333 61%
@mr-c, Can you list out the steps to generate latest test coverage locally? Also, I'm thinking of setting coveralls (to measure test coverage for each PR) for this repository. Better tests coverage is becoming increasingly important as we're gonna support multiple versions of Python. :smile:
@manu-chroma make coverage-report should do the trick. Coveralls would be great, yes!
Here's a recent measurement
~/schema_salad$ make coverage-report
Name Stmts Miss Branch BrPart Cover
------------------------------------------------------------------
schema_salad/__init__.py 7 0 0 0 100%
schema_salad/__main__.py 4 4 0 0 0%
schema_salad/add_dictlist.py 6 0 2 0 100%
schema_salad/aslist.py 6 0 2 0 100%
schema_salad/flatten.py 19 5 10 3 72%
schema_salad/jsonld_context.py 159 23 96 13 81%
schema_salad/main.py 153 40 56 15 71%
schema_salad/makedoc.py 331 31 172 21 88%
schema_salad/ref_resolver.py 677 86 388 49 85%
schema_salad/schema.py 266 19 162 21 90%
schema_salad/sourceline.py 135 20 76 8 83%
schema_salad/validate.py 211 48 164 20 75%
------------------------------------------------------------------
TOTAL 1974 276 1128 150 84%
thanks. I'm able to reproduce this locally now. :smile: