https://pantsbuild.org/ logo
b

better-sunset-63499

03/24/2022, 7:36 PM
Hi, I'm running
pytest
with the
pytest_dynamodb
plugin which requires the pytest runner to spin off a subprocess. I'm having an issue where even providing the full
/usr/bin/java
path, Pants' pytest runner can't find the binary
I'm aware of the
tools
argument on
experimental_shell_command
and I am wondering if I need something similar in my
python_tests
or pytest-args
h

hundreds-father-404

03/24/2022, 8:23 PM
hm do you know how Pytest does its discovery of the binary? Looking at
$PATH
?
b

better-sunset-63499

03/24/2022, 8:32 PM
it's just using subprocess under the hood
so I believe it respects path
For future souls that come across this thread: It was because of an
asdf
ship around the
java
command
👀 1
so pants got confused when packaging up the workdir
h

hundreds-father-404

03/25/2022, 6:56 PM
Thank you for the update! Hm so anything you think Pants is doing wrong or should be improved?
b

better-sunset-63499

03/25/2022, 6:58 PM
I'm not sure? I think the issue is that it copied the
asdf
shim (which is a bash script to select a version based on current directory) and not
java
itself
Perhaps allowing an override like telling pants a specific java binary location would be good so that it ignores the PATH containing
~/.asdf/shims/java
?
2 Views