Skip to content

Testing

Lou ! edited this page Jan 3, 2024 · 2 revisions

To run tests:

prepare

  • pip install pytest mock pytest-asyncio pytest-dependency pygls parso

  • npm install

  • set your odoo community path like this : export COMMUNITY_PATH=YOUR_PATH

CLI

[INFO] add -s if you want to see the logs from OdooLS

  • cd server/tests/unit

  • pytest test_setup.py -- test that your setup is correct and that OdooLS is starting correctly

  • pytest test_odoo_ls.py -- test the different OdooLS functionalities

  • pytest test_odoo_requests.py -- test the different OdooLS requests

VSCODE

Launch the relevant test in your configurations

image

Clone this wiki locally