juftin / hatch-pip-compile

hatch plugin to use pip-compile (or uv) to manage project dependencies and lockfiles
http://juftin.com/hatch-pip-compile/
MIT License
76 stars 3 forks source link

🧪 tests #18

Closed juftin closed 10 months ago

juftin commented 10 months ago

Summary

This project needs unit (and integration?) tests.

Acceptance Criteria

New tests. I will keep this issue open until I feel like there's sufficient coverage though.

Notes

Some elements of this project can be tough to test without an actual hatch CLI running - hopefully I can make use of the click.CliRunner for this.

oprypin commented 10 months ago

Mm I'll probably not pitch in at all regarding tests. It's a bit much for me to try to understand right now.

I was actually thinking something like literally running hatch and checking that it still installs and runs the project, like, the actual steps that you surely took many times manually to check if it still works after all our refactors. What happens if we mess up the lock file, then try to run. Then the same with DISABLE environment variable. The tests would be written in Bash or something.

juftin commented 10 months ago

Yeah this is a tough one to test - I'm going to do my best to try to do some of that bash style testing inside the pytest framework. Honestly just using the plugin to install the testing and linting environments in its own CI/CD is an integration test on its own.

https://github.com/juftin/hatch-pip-compile/blob/6cbb5816be39f3104d165a153d3085f36a4ec9df/.github/workflows/tests.yaml#L50-L59

juftin commented 10 months ago

:tada: This issue has been resolved in version 1.8.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: