Hi, I'd appreciate some help on how to handle requ...
# general
a
Hi, I'd appreciate some help on how to handle requirements that are implicitly present when running certain targets, but I still need to import them in code. In particular I mean importing
pytest
in files that belong to
python_tests
. It's there when running
./pants test
and works fine, but it's rightfully not recognized by the IDE when using the env from
./pants export
How should I approach this? Should I add
pytest
to
requirements
? If so, is there a way to keep the versions synchronized?
b
Yeah, we’ve got it in requirements and that works well. Unfortunately “manually” is the only way to keep them synced for now… I think 2.16 or 2.17 resolves that situation by allowing pants to just use the one from requirements instead of trying to have its own.
a
Thanks! That's what I'll do then. Also, that sounds like a nice quality of life improvement. Can't wait to see that 🙂
👍 1