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

Refactor Python tests with Pytest #176

Merged
merged 38 commits into from
Jun 11, 2020
Merged

Refactor Python tests with Pytest #176

merged 38 commits into from
Jun 11, 2020

Conversation

hcho3
Copy link
Collaborator

@hcho3 hcho3 commented Jun 11, 2020

  • Use Pytest features: parameterized tests, test fixture
  • Turn on test coverage for the Python codebase
  • Reformat tests to comply with pylint convention

@codecov-commenter
Copy link

codecov-commenter commented Jun 11, 2020

Codecov Report

Merging #176 into master will decrease coverage by 4.80%.
The diff coverage is 73.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #176      +/-   ##
============================================
- Coverage     85.20%   80.40%   -4.81%     
  Complexity       56       56              
============================================
  Files            58       81      +23     
  Lines          3644     4837    +1193     
  Branches         47       47              
============================================
+ Hits           3105     3889     +784     
- Misses          510      919     +409     
  Partials         29       29              
Impacted Files Coverage Δ Complexity Δ
python/treelite/core.py 64.91% <50.00%> (ø) 0.00 <0.00> (?)
python/treelite/gallery/sklearn/__init__.py 86.11% <66.66%> (ø) 0.00 <0.00> (?)
python/treelite/util.py 92.59% <66.66%> (ø) 0.00 <0.00> (?)
python/treelite/__init__.py 100.00% <100.00%> (ø) 0.00 <0.00> (?)
python/treelite/frontend.py 74.82% <100.00%> (ø) 0.00 <0.00> (?)
runtime/python/treelite_runtime/__init__.py 100.00% <100.00%> (ø) 0.00 <0.00> (?)
src/frontend/protobuf.cc 79.45% <0.00%> (-8.68%) 0.00% <0.00%> (ø%)
src/c_api/c_api.cc 76.94% <0.00%> (-8.48%) 0.00% <0.00%> (ø%)
...on/treelite/gallery/sklearn/rf_multi_classifier.py 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
python/treelite/contrib/gcc.py 100.00% <0.00%> (ø) 0.00% <0.00%> (?%)
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4651255...b2424b7. Read the comment docs.

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

Successfully merging this pull request may close these issues.

2 participants