Commit 35e4c544 authored by Nicolas Gelot's avatar Nicolas Gelot
Browse files

Use pytest-cov to get the coverage

parent 71557c7a
comment: false
coverage:
status:
project:
default:
# basic
target: auto
threshold: null
base: auto
# advanced
branches: null
if_no_uploads: error
if_not_found: success
if_ci_failed: error
only_pulls: false
flags: null
paths: null
patch:
default:
# basic
target: auto
threshold: null
base: auto
# advanced
branches: null
if_no_uploads: error
if_not_found: success
if_ci_failed: error
only_pulls: false
flags: null
paths: null
[run]
branch = True
source =
searx/engines
searx/__init__.py
searx/autocomplete.py
searx/https_rewrite.py
searx/languages.py
searx/search.py
searx/testing.py
searx/utils.py
searx/webapp.py
[report]
show_missing = True
exclude_lines =
if __name__ == .__main__.:
[html]
directory = coverage
......@@ -27,3 +27,4 @@ unittest:
- ./manage.sh update_dev_packages
script:
- ./manage.sh unit_tests
coverage: '/TOTAL.*\s+(\d+%)$/'
......@@ -40,7 +40,7 @@ pep8_check() {
unit_tests() {
echo '[!] Running unit tests'
PYTHONPATH="$BASE_DIR" pytest --disable-pytest-warnings "$BASE_DIR/tests/unit"
PYTHONPATH="$BASE_DIR" pytest --cov=searx --disable-pytest-warnings "$BASE_DIR/tests/unit"
}
py_test_coverage() {
......
babel==2.3.4
mock==2.0.0
cov-core==1.15.0
pep8==1.7.0
mockredispy==2.9.3
pytest==4.1.0
pytest-cov==2.6.1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment