aspect-build / aspect-build/rules_py
[FR]: Ability to revert default args to pytest
- Dominant language
- Starlark
- Stars
- 145
- Forks
- 97
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 71
Description
### What is the current behavior?
The `pytest.py.tmpl` hard-codes some default args to pytest: https://github.com/aspect-build/rules_py/blob/743e9a8372f6a2ba1f6027176e2f7ed9a0d0b9b1/py/private/pytest.py.tmpl#L27-L33
* It sets test output to verbose, which greatly increases the output to scroll through
* It disables the [cacheprovider](https://docs.pytest.org/en/stable/how-to/cache.html) plugin, which means that we can't use the `--lf` or `--ff` options to run the last failed or failed first.
### Describe the feature
I'm curious:
1. what was the motivation for these default arguments?
2. can we make them configurable / opt-out either via environment variables? There is already the ability to add additional flags, but there doesn't seem to be a way to remove flags (at least, I'm not sure how to "un"-disable a plugin that was disabled in pytest).
Contributor guide
Research direction
Start with pytest.py.tmpl around lines 27-33 and inspect how the existing additional-flag support is wired. Determine how to make the hard-coded verbosity and cacheprovider settings configurable or opt-out while retaining additional flags; done means pytest can use --lf or --ff and no longer forces verbose output when configured otherwise.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100