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

pip cache remove for out-of-test testing of builder plugins. #1590

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/how-to/plugins/testing-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,7 @@ version = "0.1.0"
...
```

Alternatively, you may wish to perform `pip cache remove hatch-plugin-name` before testing it manually on some project with `hatch build --target hatch-plugin-target`. This is suitable when developing a plugin in tandem with another project consuming it. However, it is not advisable for writing tests inside a builder plugin project, self-contained, as it modifies the global cache of the system rather than working around it at the test level. For writing tests, the former method is advisable.

!!! note
This example chooses to ignore copying `.git` for performance reasons. You may want to ignore more patterns, or copy only specific paths like [this plugin](https://github.com/hynek/hatch-fancy-pypi-readme/blob/main/tests/conftest.py) does.
2 changes: 1 addition & 1 deletion docs/plugins/builder/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

-----

See the documentation for [build configuration](../../config/build.md).
See the documentation for [build configuration](../../config/build.md) and the how-to for [testing plugins](../../how-to/plugins/testing-builds.md).

## Known third-party

Expand Down