Hi everyone, is it possible to have `python_tests(...
# general
f
Hi everyone, is it possible to have
python_tests()
depend on a Docker image that needs to be created for the tests to run in?
b
f
Pants wants to pull the image I define instead of building it?
I think we're basically doing the same as https://github.com/pantsbuild/pants/issues/17714 😄
p
We have a macro for docker images that creates both a "normal" target with registries as well as a local one without and we have the tests depend on the local one in the regular dependencies and then use the latest tag of the local images in our tests
f
Care to elaborate? I'm new to Pants, so... 😄
p
ah, I misspoke, we use the runtime_package_dependencies as mentioned. Re macros: https://www.pantsbuild.org/stable/docs/writing-plugins/macros#how-to-add-a-macro We use a macro so that we can define a single build target, but the macro creates 2 different ones, one of which has no registry arguments, so there is no remote version, and we depend on the latest tag of that no remote version. The macro is not truly necessary, it's just for convenience.