Acceptance Test Failing: no pytest

I’m trying to run acceptance test, but they keep failing because of pytest not found in container.


  1. Build docker image

docker build . -t airbyte/source-yandex-metrica:dev

  1. Run integration tests

pytest -p integration_tests.acceptance

Tests start running and this is the main error being thrown:

E docker.errors.ContainerError: Command ‘discover --config tap_config.json’ in image ‘<Image: ‘airbyte/source-yandex-metrica:dev’>’ returned non-zero exit status 1: {“type”: “TRACE”, “trace”: {“type”: “ERROR”, “emitted_at”: 1658408188739.958, “error”: {“message”: “Something went wrong in the connector. See the logs for more details.”, “internal_message”: “No module named ‘pytest’”, “stack_trace”: “Traceback (most recent call last):\n File "/airbyte/integration_code/", line 9, in \n from source_yandex_metrica import SourceYandexMetrica\n File "/airbyte/integration_code/source_yandex_metrica/", line 6, in \n from .source import SourceYandexMetrica\n File "/airbyte/integration_code/source_yandex_metrica/", line 6, in \n from pytest import param\nModuleNotFoundError: No module named ‘pytest’\n”, “failure_type”: “system_error”}}}

…/…/bases/source-acceptance-test/source_acceptance_test/utils/ ContainerError

Ok I figured it out. I had to add pytest as dependency to MAIN_REQUIREMENTS list in