-
-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Omit tests directory from code coverage #735
base: master
Are you sure you want to change the base?
Changes from 7 commits
1f5c91f
c9fedb3
3879b00
802223a
f786c50
c015442
526df6f
774a8d8
5bbbfd1
40c7c2c
06adbb5
ca099d0
80b5d84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,11 +43,13 @@ hiredis = redis[hiredis]>=4.0.2 | |
|
||
[coverage:run] | ||
omit = | ||
tests/*, | ||
*/tests/* | ||
|
||
[coverage:report] | ||
precision = 1 | ||
skip_covered = true | ||
omit = | ||
*/tests/* | ||
|
||
[tox:tox] | ||
minversion = 3.15.0 | ||
|
@@ -80,18 +82,18 @@ REDIS = | |
[testenv] | ||
passenv = CI, GITHUB* | ||
commands = | ||
{envpython} -m pytest --cov-report= --ds=settings.sqlite {posargs} | ||
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_herd {posargs} | ||
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_json {posargs} | ||
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_lz4 {posargs} | ||
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_msgpack {posargs} | ||
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_sentinel {posargs} | ||
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_sentinel_opts {posargs} | ||
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_sharding {posargs} | ||
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_usock {posargs} | ||
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_zlib {posargs} | ||
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_zstd {posargs} | ||
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_gzip {posargs} | ||
{envpython} -m pytest -vv --ignore=tests/* --cov-report= --ds=settings.sqlite {posargs} | ||
{envpython} -m pytest -vv --ignore=tests/* --cov-append --cov-report= --ds=settings.sqlite_herd {posargs} | ||
{envpython} -m pytest -vv --ignore=tests/* --cov-append --cov-report= --ds=settings.sqlite_json {posargs} | ||
{envpython} -m pytest -vv --ignore=tests/* --cov-append --cov-report= --ds=settings.sqlite_lz4 {posargs} | ||
{envpython} -m pytest -vv --ignore=tests/* --cov-append --cov-report= --ds=settings.sqlite_msgpack {posargs} | ||
{envpython} -m pytest -vv --ignore=tests/* --cov-append --cov-report= --ds=settings.sqlite_sentinel {posargs} | ||
{envpython} -m pytest -vv --ignore=tests/* --cov-append --cov-report= --ds=settings.sqlite_sentinel_opts {posargs} | ||
{envpython} -m pytest -vv --ignore=tests/* --cov-append --cov-report= --ds=settings.sqlite_sharding {posargs} | ||
{envpython} -m pytest -vv --ignore=tests/* --cov-append --cov-report= --ds=settings.sqlite_usock {posargs} | ||
{envpython} -m pytest -vv --ignore=tests/* --cov-append --cov-report= --ds=settings.sqlite_zlib {posargs} | ||
{envpython} -m pytest -vv --ignore=tests/* --cov-append --cov-report= --ds=settings.sqlite_zstd {posargs} | ||
{envpython} -m pytest -vv --ignore=tests/* --cov-append --cov-report= --ds=settings.sqlite_gzip {posargs} | ||
{envpython} -m coverage report | ||
{envpython} -m coverage xml | ||
|
||
|
@@ -115,7 +117,7 @@ envdir={toxworkdir}/lint | |
commands = | ||
black: black --target-version py36 {posargs:--check --diff} setup.py django_redis/ tests/ | ||
ruff: ruff {posargs:check --show-fixes} django_redis/ tests/ | ||
mypy: mypy {posargs:--cobertura-xml-report .} django_redis tests | ||
mypy: mypy {posargs:--cobertura-xml-report .} django_redis | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please restore this, as also tests should be checked for typing errors so that we can notice breaking changes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure @WisdomPill ! This was just experimental. Any suggestions to avoid tests directory from coverage report? |
||
deps = | ||
black | ||
django-stubs | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need these ignores?