Skip to content

Commit

Permalink
pip cache remove for out-of-test testing of builder plugins.
Browse files Browse the repository at this point in the history
  • Loading branch information
gl-yziquel committed Jun 29, 2024
1 parent 72e0942 commit 40bb2d5
Showing 1 changed file with 2 additions and 0 deletions.
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 modifying 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.

0 comments on commit 40bb2d5

Please sign in to comment.