ustunb / risk-slim

simple customizable risk scores in python
BSD 3-Clause "New" or "Revised" License
132 stars 34 forks source link

Update tests #22

Closed ryanhammonds closed 1 year ago

ryanhammonds commented 1 year ago

I've started updating tests as a way to learn more about the repo and to expand coverage. So far, I reworked the loss functions tests to work with pytest. I moved the data generating functions to pytest fixtures in tests/conftest.py. The existing tests were moved to tests/loss_functions/test_log_loss_compare.py since these test ran comparisons between fast, normal, and weighted loss. I also added unit tests that tests the loss functions in isolation and an extra simulation case. To run pytest:

pip install pytest pytest-cov 
pytest riskslim/tests --cov

I'll add tests to this PR as I read/learn about the other riskslim/*.py files. Then I'll start on changes related to API, reports, automated builds / CI, etc.

ryanhammonds commented 1 year ago

This has been outdated by #23.