I'd like to create a pex including Pytest & Pl...
# general
n
I'd like to create a pex including Pytest & Playwright to run Synthetics tests on a live production server. Is there a way to specify Pants's version of Pytest in a dependency? Am I over-complicating how to think about this?
e.g. we have a Playwright script that clicks some buttons on a web-page, I'd like to turn that into an Airflow DAG
c
not sure what you’re trying to do exactly, but if you want a particular version of pants in your resolve, this target could be useful: https://www.pantsbuild.org/docs/reference-pants_requirements
🙏 1
but, just as I say that, I realize we’re no longer publishing to pypi, which may break this… Edit: nope, I was wrong… it’s not broken.
👍 1
n
create a docker image w/ the same version of pytest that's bundled with pants
okay cool thanks for the tip
c
np. thanks for incidentally bringing this target to my attention, I think we have something to address here..
b
You can install pytest from your own dependency specification, which allows treating it as a normal dependency. I’m on phone so can’t link, but the
install_from_resolve
config is what’s relevant
👍 1
h
I assume you have to run
playwright install
on the deployed pex somehow, to install the actual browser engines?
👍 1