Closed agitter closed 8 years ago
Great find with the bug and I agree that mu should be >0.
As far as the test framework, I used the cookiecutter template and the requirements were added in. I think by default it would call the python script under tests/. However, it seems that pytest has a different framework for integration with setup.py: https://pytest.org/latest/goodpractises.html, so I'd say go with what they recommend.
sara
The mu > 0 requirement has been addressed:
We are updating setup.py per the PyTest good practices but this is still in progress. One change is that setuptools is now required because distutils does not support some of the preferred test integration. I'll add an update here when this is completed and we are ready to merge.
The score unit test now works with
python setup.py test
This branch can be reviewed and merged.
In preparation for an end-to-end integration test that will check whether garnet and forest reproduce saved results from the example data, we are changing the test framework to PyTest. As a proof-of-concept, we implemented a simple unit test for the score() function that calculates negative prizes for forest. To simplify the test, we moved score() out of the PCSFInput class and made it a standalone function. This revealed a bug in score() - with the musquared option it produced positive prizes instead of negative - which has been fixed.
There are a few questions to be addressed before merging this pull request: