ofek / coincurve

Cross-platform Python bindings for libsecp256k1
https://ofek.dev/coincurve/
Apache License 2.0
153 stars 46 forks source link

(feat) refactor tests with fixture #146

Closed MementoRC closed 8 months ago

MementoRC commented 8 months ago

The purpose is to be able to run pytest with the cibuildwheel feature. cibuildwheel install the tests in a manner that prevent tests to be recognized as a package and thus there is pretty much no way to import samples (at least none within the 50 commits I made on my branch to test it out!)

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.68%. Comparing base (b8e9dfe) to head (746f7c9).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #146 +/- ## ========================================== + Coverage 85.63% 85.68% +0.05% ========================================== Files 11 11 Lines 564 566 +2 Branches 66 67 +1 ========================================== + Hits 483 485 +2 Misses 45 45 Partials 36 36 ``` | [Files](https://app.codecov.io/gh/ofek/coincurve/pull/146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ofek+Lev) | Coverage Δ | | |---|---|---| | [tests/conftest.py](https://app.codecov.io/gh/ofek/coincurve/pull/146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ofek+Lev#diff-dGVzdHMvY29uZnRlc3QucHk=) | `100.00% <100.00%> (ø)` | | | [tests/test\_ecdsa.py](https://app.codecov.io/gh/ofek/coincurve/pull/146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ofek+Lev#diff-dGVzdHMvdGVzdF9lY2RzYS5weQ==) | `100.00% <100.00%> (ø)` | | | [tests/test\_keys.py](https://app.codecov.io/gh/ofek/coincurve/pull/146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ofek+Lev#diff-dGVzdHMvdGVzdF9rZXlzLnB5) | `100.00% <100.00%> (ø)` | | | [tests/test\_utils.py](https://app.codecov.io/gh/ofek/coincurve/pull/146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ofek+Lev#diff-dGVzdHMvdGVzdF91dGlscy5weQ==) | `100.00% <100.00%> (ø)` | |
ofek commented 8 months ago

Which should I review first?

MementoRC commented 8 months ago

This PR and safer download are fairly independent and already incorporated to the third one, they should be fairly straightforward to review and mostly come down to whether you want to go that direction or not,

I may add more smaller ones to carve out the bigger one, I was working on it and saw that you started to be active, so i wanted to tickle your attention

MementoRC commented 8 months ago

This should help enable the full pytest test-suite for the built the wheels with cibuildwheel