|
| 1 | +[html] |
| 2 | +show_contexts = true |
| 3 | +skip_covered = false |
| 4 | + |
| 5 | +[paths] |
| 6 | +_site-packages-to-src-mapping = [ |
| 7 | + '.', |
| 8 | + '*/lib/pypy*/site-packages', |
| 9 | + '*/lib/python*/site-packages', |
| 10 | + '*\Lib\site-packages', |
| 11 | +] |
| 12 | + |
| 13 | +[report] |
| 14 | +exclude_also = [ |
| 15 | + 'if TYPE_CHECKING', |
| 16 | + 'assert False', |
| 17 | + ': \.\.\.(\s*#.*)?$', |
| 18 | + '^ +\.\.\.$', |
| 19 | + 'pytest.fail\(', |
| 20 | + # '^\s*@pytest\.mark\.xfail', # important for Dreamsorcerer |
| 21 | +] |
| 22 | +# fail_under = 100 |
| 23 | +partial_also = [ |
| 24 | + 'if not TYPE_CHECKING', |
| 25 | +] |
| 26 | +show_missing = true |
| 27 | +skip_covered = true |
| 28 | +skip_empty = true |
| 29 | + |
1 | 30 | [run] |
2 | 31 | branch = true |
3 | 32 | # NOTE: `ctrace` tracing method is needed because the `sysmon` tracer |
4 | 33 | # NOTE: which is default on Python 3.14, causes unprecedented slow-down |
5 | | -# NOTE: of the test runs. |
| 34 | +# NOTE: of the test runs. Also, Cython the `Cython.Coverage` plugin does |
| 35 | +# NOTE: not support `sysmon`. |
6 | 36 | # Ref: https://github.com/coveragepy/coveragepy/issues/2099 |
7 | 37 | core = 'ctrace' |
8 | | -source = [ |
9 | | - 'aiohttp', |
10 | | - 'tests', |
| 38 | +cover_pylib = false |
| 39 | +# NOTE: `disable_warnings` is needed when `pytest-cov` runs in tandem |
| 40 | +# NOTE: with `pytest-xdist`. These warnings are false negative in this |
| 41 | +# NOTE: context. |
| 42 | +# |
| 43 | +# NOTE: It's `coveragepy` that emits the warnings and previously they |
| 44 | +# NOTE: wouldn't get on the radar of `pytest`'s `filterwarnings` |
| 45 | +# NOTE: mechanism. This changed, however, with `pytest >= 8.4`. And |
| 46 | +# NOTE: since we set `filterwarnings = error`, those warnings are being |
| 47 | +# NOTE: raised as exceptions, cascading into `pytest`'s internals and |
| 48 | +# NOTE: causing tracebacks and crashes of the test sessions. |
| 49 | +# |
| 50 | +# Ref: |
| 51 | +# * https://github.com/pytest-dev/pytest-cov/issues/693 |
| 52 | +# * https://github.com/pytest-dev/pytest-cov/pull/695 |
| 53 | +# * https://github.com/pytest-dev/pytest-cov/pull/696 |
| 54 | +disable_warnings = [ |
| 55 | + 'module-not-measured', |
11 | 56 | ] |
| 57 | +# https://coverage.rtfd.io/en/latest/contexts.html#dynamic-contexts |
| 58 | +# dynamic_context = 'test_function' # conflicts with `pytest-cov` if set here |
12 | 59 | omit = [ |
13 | | - 'site-packages', |
| 60 | + 'setup.py', |
14 | 61 | ] |
15 | | - |
16 | | -[report] |
17 | | -partial_also = [ |
18 | | - 'if not TYPE_CHECKING', |
| 62 | +# NOTE: tests/autobahn/test_autobahn.py::test_{client,server} |
| 63 | +# NOTE: pass `-a|--append` to `coverage run` wich conflicts |
| 64 | +# NOTE: with `-p|--parallel-mode`. We cannot override it on |
| 65 | +# NOTE: the CLI level, but instead define an environment |
| 66 | +# NOTE: variable to implement this. |
| 67 | +# |
| 68 | +# Refs: |
| 69 | +# * https://discord.com/channels/267624335836053506/1253355750684753950/1537906072474488973 |
| 70 | +# * https://discord.com/channels/267624335836053506/1253355750684753950/1537914331629486130 |
| 71 | +parallel = '${COVERAGE_PARALLEL_MODE-true}' |
| 72 | +# plugins = [ |
| 73 | +# 'covdefaults', |
| 74 | +# ] |
| 75 | +relative_files = true |
| 76 | +source = [ |
| 77 | + '.', |
19 | 78 | ] |
20 | | -exclude_also = [ |
21 | | - 'if TYPE_CHECKING', |
22 | | - 'assert False', |
23 | | - ': \.\.\.(\s*#.*)?$', |
24 | | - '^ +\.\.\.$', |
25 | | - 'pytest.fail\(' |
| 79 | +source_pkgs = [ |
| 80 | + 'aiohttp', |
26 | 81 | ] |
0 commit comments