Is there a way to mark a test as using external AP...
# general
a
Is there a way to mark a test as using external APIs/outside of pants information, so it's cached result can't be trusted? Essentially I want to never cache the execution result of a test, but still cache all the pytest/venv builds for it
f
Not currently but it should be straightforward to implement. The Pants backends which implement the
test
goal know how to apply the --test-force option by modifying the "cache scope" of a test execution. So the work to implement this idea would mainly be in deciding the UX for it and then just threading that value to the places setting cache scope.
a
Actually for my usecase it's not that big of a headache to have a separate
pants test
call for this test (since you need to setup these external dependency access anyway) so the goal level setting works for me. Thanks!
w
Just a note, I think caching for pytest is a file-level cache (but I don't recall if there are plugins to do it at the test level)
👍 1
f
Actually for my usecase it's not that big of a headache to have a separate
pants test
call for this test (since you need to setup these external dependency access anyway) so the goal level setting works for me. Thanks!
Even simpler then!