diff --git a/HOW-TO-USE.md b/HOW-TO-USE.md index 541d8b37..11a50499 100644 --- a/HOW-TO-USE.md +++ b/HOW-TO-USE.md @@ -70,3 +70,44 @@ docker compose up generate ``` This will create new folders for the new version you just added. + +## Running tests locally + +To run the python tests you need to install requirements + +```bash +$ pip install -r requirements.txt +``` + +Then you can run the tests: + +```bash +$ nosetests +``` + +Locally you may have an error like ``, running these commands may help running tests locally: + +```bash +$ pip uninstall -y nose +$ pip install -U nose --no-binary :all: +``` + +or alternatively: + +```bash +$ pip install nose-py3 +``` + +If you need to debug one specific test you first need to run + +``` +$ nosetests --with-id +``` + +This will execute tests and each test method will be assigned an ID that you can then use to filter it specifically: + +``` +$ nosetests --with-id 7 +``` + +This will also generate a `.nodeids` binary file, when you add new test methods you need to remove this file to re-generate the list of IDs.