Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

Use pytest-cov to get the coverage

parent 71557c7a
Loading
Loading
Loading
Loading

.codecov.yml

deleted100644 → 0
+0 −31
Original line number Diff line number Diff line
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

.coveragerc

deleted100644 → 0
+0 −20
Original line number Diff line number Diff line
[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
+1 −0
Original line number Diff line number Diff line
@@ -27,3 +27,4 @@ unittest:
    - ./manage.sh update_dev_packages
  script:
    - ./manage.sh unit_tests
  coverage: '/TOTAL.*\s+(\d+%)$/'
+1 −1
Original line number Diff line number Diff line
@@ -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() {
+1 −1
Original line number Diff line number Diff line
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