rules_py
rules_py copied to clipboard
[FR]: Ability to revert default args to pytest
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 plugin, which means that we can't use the
--lfor--ffoptions to run the last failed or failed first.
Describe the feature
I'm curious:
- what was the motivation for these default arguments?
- 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).
This sounds like a good feature request, ideally we'd want to still add these flags, if no flags were provided, and let the call site completely override it.
I'd like to review a PR, if anyone would like to make one.