Skip to content
Permalink
Browse files

Merge pull request #4173 from hugovk/cover-tests

Include tests in coverage reports
  • Loading branch information
radarhere committed Dec 2, 2019
2 parents 4e125fd + ce382e7 commit 4551d3aeb3b2fc22ca25a4abe088343434aea4b4
Showing with 18 additions and 190 deletions.
  1. +1 −1 .appveyor.yml
  2. +7 −0 .codecov.yml
  3. +7 −0 .coveragerc
  4. +1 −1 .github/workflows/test-windows.yml
  5. +1 −1 .travis/test.sh
  6. +1 −1 Tests/README.rst
  7. +0 −23 Tests/bench_get.py
  8. +0 −14 Tests/import_all.py
  9. +0 −66 Tests/make_hash.py
  10. +0 −57 Tests/threaded_save.py
  11. +0 −26 Tests/versions.py
@@ -80,7 +80,7 @@ test_script:
- cd c:\pillow
- '%PYTHON%\%PIP_DIR%\pip.exe install pytest pytest-cov'
- c:\"Program Files (x86)"\"Windows Kits"\10\Debuggers\x86\gflags.exe /p /enable %PYTHON%\%EXECUTABLE%
- '%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov-report term --cov-report xml Tests'
- '%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests'
#- '%PYTHON%\%EXECUTABLE% test-installed.py -v -s %TEST_OPTIONS%' TODO TEST_OPTIONS with pytest?

after_test:
@@ -9,3 +9,10 @@ codecov:
token: 6dafc396-e7f5-4221-a38a-8b07a49fbdae

comment: off

# Matches 'omit:' in .coveragerc
ignore:
- "Tests/32bit_segfault_check.py"
- "Tests/bench_cffi_access.py"
- "Tests/check_*.py"
- "Tests/createfontdatachunk.py"
@@ -12,3 +12,10 @@ exclude_lines =
# Don't complain about debug code
if Image.DEBUG:
if DEBUG:

[run]
omit =
Tests/32bit_segfault_check.py
Tests/bench_cffi_access.py
Tests/check_*.py
Tests/createfontdatachunk.py
@@ -351,7 +351,7 @@ jobs:
rem Add libraqm.dll (copied to INCLIB) to PATH.
path %INCLIB%;%PATH%
cd /D %GITHUB_WORKSPACE%
%PYTHON%\python.exe -m pytest -vx --cov PIL --cov-report term --cov-report xml Tests
%PYTHON%\python.exe -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests
shell: cmd

- name: Upload errors
@@ -2,7 +2,7 @@

set -e

python -m pytest -v -x --cov PIL --cov-report term Tests
python -m pytest -v -x --cov PIL --cov Tests --cov-report term Tests

# Docs
if [ "$TRAVIS_PYTHON_VERSION" == "3.7" ]; then make doccheck; fi
@@ -27,6 +27,6 @@ Run all the tests from the root of the Pillow source distribution::

Or with coverage::

pytest --cov PIL --cov-report term
pytest --cov PIL --cov Tests --cov-report term
coverage html
open htmlcov/index.html

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 4551d3a

Please sign in to comment.
You can’t perform that action at this time.