Error: pytest not found

Hello,

I’m using the following docker-image:
quay.io/astronomer/ap-airflow:2.2.2

I’m having trouble executing pytests using the astro-dev cli command.

When executing the cmd below:
astro dev pytest

This error surfaces:
bash: line 1: pytest: command not found.

However, I’m able to execute pytests successfully when running the following commands:

astro dev bash --scheduler 

# execute pytest from the interactive bash shell from the docker container running the airflow-scheduler
pytest

Does anyone have suggestions how to fix the issue with astro dev pytest?

I think I found the issue. I should be using the following docker image:
quay.io/astronomer/ap-airflow:2.2.2-onbuild

Yes you would need add-onbuild to the docker tag for python requirements to install to correctly. If are still getting this error add pytest to your requirements.txt