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

🧪 tests #18

Closed
juftin opened this issue Nov 24, 2023 · 3 comments · Fixed by #45
Closed

🧪 tests #18

juftin opened this issue Nov 24, 2023 · 3 comments · Fixed by #45
Assignees
Labels

Comments

@juftin
Copy link
Owner

juftin commented Nov 24, 2023

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.

@juftin juftin self-assigned this Nov 24, 2023
@juftin juftin changed the title tests 🧪 tests Nov 28, 2023
@oprypin
Copy link
Contributor

oprypin commented Dec 6, 2023

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
Copy link
Owner Author

juftin commented Dec 6, 2023

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.

- name: Install Hatch
run: |
python -m pip install --upgrade pip wheel
python -m pip install -q hatch pre-commit
python -m pip install -q "${{ github.workspace }}"
hatch --version
- name: Test Suite
run: |
echo "::add-matcher::.github/workflows/matchers/python.json"
hatch run +py=${{ matrix.python }} matrix:cov

@juftin
Copy link
Owner Author

juftin commented Dec 20, 2023

🎉 This issue has been resolved in version 1.8.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants