Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve test code coverage #10

Open
mr-c opened this issue Feb 6, 2016 · 4 comments
Open

improve test code coverage #10

mr-c opened this issue Feb 6, 2016 · 4 comments

Comments

@mr-c
Copy link
Member

mr-c commented Feb 6, 2016

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 mr-c changed the title improve tests coverage improve test code coverage Feb 6, 2016
@manu-chroma
Copy link
Member

@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. 😄

@mr-c
Copy link
Member Author

mr-c commented May 30, 2017

@manu-chroma make coverage-report should do the trick. Coveralls would be great, yes!

@mr-c
Copy link
Member Author

mr-c commented May 30, 2017

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%

@manu-chroma
Copy link
Member

thanks. I'm able to reproduce this locally now. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants