https://pantsbuild.org/ logo
#plugins
Title
# plugins
p

proud-dentist-22844

03/31/2023, 5:09 PM
I updated from pants 2.16.0a0 to 2.16.0a1 and now some of my pants plugin tests are showing wonky errors (like complaining about the syntax
: str
in a dataclass) for a
VenvPex
my rule is running. So, I want to debug this - how can I set
--keep-sandboxes=on_failure
for something running via pytest + rule_runner? I can get in the pytest sandbox, but I want to see the individual test's rule_runner's sandbox.
1
I suppose I could modify the test to add keep-sandboxes. I'll try that
h

happy-kitchen-89482

03/31/2023, 5:16 PM
Ugh yeah, debugging pants-in-pants is always a bit of a pain. I usually modify the test as you suggest
p

proud-dentist-22844

03/31/2023, 5:17 PM
Adding
rule_runner.set_options(["--keep-sandboxes=always"])
doesn't seem to be doing the trick. The path shown in the traceback doesn't exist 😕
It's one of my simplest rules too. So, I'm a bit befuddled 😛