Skip to content
Snippets Groups Projects
Commit d3e85cea authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fixed Python coverage

parent 998671f4
No related branches found
No related tags found
1 merge request!4Fixed Python coverage
Pipeline #31173 passed
...@@ -28,7 +28,9 @@ coverage:ubuntu_python: ...@@ -28,7 +28,9 @@ coverage:ubuntu_python:
- source venv/bin/activate - source venv/bin/activate
- python3 -m pip install numpy coverage - python3 -m pip install numpy coverage
- cd ${CI_PROJECT_NAME} - cd ${CI_PROJECT_NAME}
- python3 -m coverage run --source=. -m unittest discover -s unit_tests/ -v -b # Retrieve the installation path of the module, since it is installed with pip.
- export MODULE_LOCATION=`python -c "import ${CI_PROJECT_NAME} as _; print(_.__path__[0])"`
- python3 -m coverage run --source=$MODULE_LOCATION -m unittest discover -s unit_tests/ -v -b
- python3 -m coverage report - python3 -m coverage report
- python3 -m coverage xml - python3 -m coverage xml
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment