Can't run test to django application on Docker with pytest

I am developing django application with PyCharm and trying to test application with pytest, but tests don't run.

Application works on Docker(Docker Compose), consisted of three containers with nginx--web(python3.6.5)--postgresql, and I use testing framework of pytest.


I added configuration

Run/Debug Configurations > "+" > Python tests > pytest

and set below


 I tryied to run, then error is shown on console



Testing started at 10:51 ...

/usr/local/bin/docker-compose -f (/path/to/docker-compose.yml) -f /Users/(user_name)/Library/Caches/PyCharm2019.1/tmp/docker-compose.override.42.yml up --exit-code-from web --abort-on-container-exit web
postgres is up-to-date
Recreating web ...
Attaching to web
web | Launching pytest with arguments (/path/to/ in /opt/project
web |
web | re-exec with libfaketime dependencies
web | usage: [-h] [--path PATH] [--target TARGET]
web | error: unrecognized arguments: (/path/to/
web exited with code 2
Aborting on container exit...

Process finished with exit code 2

Empty suite


It looks PyCharm couldn't pass pytest command properly to web container, but i can't be sure.


Anyone have idea to help me?


Please tell me if any information is sufficient.



testing with pytest inside web conteiner can run.

1 comment
Comment actions Permalink


Will it be possible for you to reproduce the issue in a minimal project and upload it for us so that we can reproduce locally?


Please sign in to leave a comment.