Skip to content

Commit

Permalink
Merge pull request #4173 from hugovk/cover-tests
Browse files Browse the repository at this point in the history
Include tests in coverage reports
  • Loading branch information
radarhere committed Dec 2, 2019
2 parents 4e125fd + ce382e7 commit 4551d3a
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 190 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Expand Up @@ -80,7 +80,7 @@ test_script:
- cd c:\pillow - cd c:\pillow
- '%PYTHON%\%PIP_DIR%\pip.exe install pytest pytest-cov' - '%PYTHON%\%PIP_DIR%\pip.exe install pytest pytest-cov'
- c:\"Program Files (x86)"\"Windows Kits"\10\Debuggers\x86\gflags.exe /p /enable %PYTHON%\%EXECUTABLE% - 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? #- '%PYTHON%\%EXECUTABLE% test-installed.py -v -s %TEST_OPTIONS%' TODO TEST_OPTIONS with pytest?


after_test: after_test:
Expand Down
7 changes: 7 additions & 0 deletions .codecov.yml
Expand Up @@ -9,3 +9,10 @@ codecov:
token: 6dafc396-e7f5-4221-a38a-8b07a49fbdae token: 6dafc396-e7f5-4221-a38a-8b07a49fbdae


comment: off comment: off

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

[run]
omit =
Tests/32bit_segfault_check.py
Tests/bench_cffi_access.py
Tests/check_*.py
Tests/createfontdatachunk.py
2 changes: 1 addition & 1 deletion .github/workflows/test-windows.yml
Expand Up @@ -351,7 +351,7 @@ jobs:
rem Add libraqm.dll (copied to INCLIB) to PATH. rem Add libraqm.dll (copied to INCLIB) to PATH.
path %INCLIB%;%PATH% path %INCLIB%;%PATH%
cd /D %GITHUB_WORKSPACE% 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 shell: cmd


- name: Upload errors - name: Upload errors
Expand Down
2 changes: 1 addition & 1 deletion .travis/test.sh
Expand Up @@ -2,7 +2,7 @@


set -e 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 # Docs
if [ "$TRAVIS_PYTHON_VERSION" == "3.7" ]; then make doccheck; fi if [ "$TRAVIS_PYTHON_VERSION" == "3.7" ]; then make doccheck; fi
2 changes: 1 addition & 1 deletion Tests/README.rst
Expand Up @@ -27,6 +27,6 @@ Run all the tests from the root of the Pillow source distribution::


Or with coverage:: Or with coverage::


pytest --cov PIL --cov-report term pytest --cov PIL --cov Tests --cov-report term
coverage html coverage html
open htmlcov/index.html open htmlcov/index.html
23 changes: 0 additions & 23 deletions Tests/bench_get.py

This file was deleted.

14 changes: 0 additions & 14 deletions Tests/import_all.py

This file was deleted.

66 changes: 0 additions & 66 deletions Tests/make_hash.py

This file was deleted.

57 changes: 0 additions & 57 deletions Tests/threaded_save.py

This file was deleted.

26 changes: 0 additions & 26 deletions Tests/versions.py

This file was deleted.

0 comments on commit 4551d3a

Please sign in to comment.