aboutsummaryrefslogtreecommitdiffstats
path: root/moon_pythonunittest
diff options
context:
space:
mode:
authorfrancois.cellier <francois.cellier@orange.com>2018-03-13 11:12:43 +0100
committerThomas Duval <thomas.duval@orange.com>2018-03-14 09:23:35 +0100
commit9f7c9cd25e7b89a208b64b8833b760c2b0d0ea07 (patch)
treee00c3980540a9e5f9dd8204474b0b58fe8c1f6e7 /moon_pythonunittest
parent7d7a0a56ad4dc58ae24e205187b6129f7288bb46 (diff)
add coverage test report in term, xml (for jenkins use) and html
Change-Id: Icb6ecc7075e0f5ad178c510762596048e3539290
Diffstat (limited to 'moon_pythonunittest')
-rw-r--r--moon_pythonunittest/requirements.txt3
-rw-r--r--moon_pythonunittest/run_tests.sh6
2 files changed, 5 insertions, 4 deletions
diff --git a/moon_pythonunittest/requirements.txt b/moon_pythonunittest/requirements.txt
index b611b008..fe107293 100644
--- a/moon_pythonunittest/requirements.txt
+++ b/moon_pythonunittest/requirements.txt
@@ -7,4 +7,5 @@ werkzeug
flask
requests
pytest
-requests_mock \ No newline at end of file
+pytest-cov
+requests_mock
diff --git a/moon_pythonunittest/run_tests.sh b/moon_pythonunittest/run_tests.sh
index b59a9ec2..688166f0 100644
--- a/moon_pythonunittest/run_tests.sh
+++ b/moon_pythonunittest/run_tests.sh
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
cd /data
-#pip3 install -r tests/python_unit/requirements.txt --upgrade
-#pip3 install .
+pip3 install -r tests/unit_python/requirements.txt --upgrade
+pip3 install .
if [ -f /data/tests/unit_python/run_tests.sh ];
then
@@ -10,4 +10,4 @@ then
fi
cd /data/tests/unit_python
-pytest -s .
+pytest --cov --cov-report term --cov-report html --cov-report xml .