-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use pytest when Odoo is running from docker container ? #39
Comments
Hello @tarek-caesar Instead of using an existing container, you might prefer to create a new container just to run pytest if you need your server online at the same time. If you use the |
Thanks for your answer, i will check that. |
Hello I figured this out, I wrote an article to explain better how to run odoo's tests with pycharm, generate coverage reports and get debugging working, I hope this is useful for you: https://medium.com/plusteam/how-to-run-odoo-tests-with-pycharm-51e4823bdc59. I included an example repository with some commands to set up a testing database, etc. |
@tarek-caesar btw, you can run the tests in the same container you regularly use, you just need to specify a different port, like this:
|
You can use the param --no-http to run another instance without stopping odoo or exposing new ports |
Hello guys,
first i would like to thank you for this awesome tool !
I'm running Odoo from docker container and what i did is the following :
docker exec -ti <my_odoo_container> bash
pip3 install pytest-odoo
pytest -s addons/<my_module>/tests/test_account_move.py --odoo-database=staging_3
But it gives me this error

OSError: [Errno 98] Address already in use
:Did anyone encounter a similar issue ?
Thanks.
The text was updated successfully, but these errors were encountered: