rules_py icon indicating copy to clipboard operation
rules_py copied to clipboard

[FR]: Ability to revert default args to pytest

Open navignaw opened this issue 1 year ago • 1 comments

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 --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).

navignaw avatar Dec 08 '24 01:12 navignaw

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.

thesayyn avatar Jan 21 '25 18:01 thesayyn