hey folks, I'm writing tests and I'm confused. Usi...
# development
c
hey folks, I'm writing tests and I'm confused. Using a RuleRunner I've copypasted from another test, I'm hitting:
Copy code
E           pants.core.util_rules.system_binaries.BinaryNotFoundError: Was not able to locate a Python interpreter to execute rule code.
E           
E           Please ensure that Python is available in one of the locations identified by `[python-bootstrap].search_path`, which currently expands to:
E           
E           []
I'm not really sure what's up. I feel like I've dealt with this before, maybe I needed to pass my path through or something? is that necessary if I want a PythonSetup to show up?
1
w
yea, this bit is (partially) explicit: sec.
it’s … slightly annoying, because we already includelist those env vars into the test process itself: https://github.com/pantsbuild/pants/blob/b3ad1c1efa8716db64e4d4422cac854a42987d12/pants.toml#L174-L184 … the RuleRunner then has its own includelist.
c
neat, that works, thanks! Is this something we should document explicitely? the page on testing mentions using env_inherit to get PATH through, but not that it should be used to get PythonSetup to instantiate.
w
hm. yea, possibly…? lots of things consume the PATH, so that’s probably just one case. but maybe a particularly important one