mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 07:47:14 +03:00
pytest/coverage: Improve the .toml comment about pragma 'inversion'
This commit is contained in:
parent
7aa832e3d1
commit
80a8a32666
@ -263,8 +263,6 @@ e.g.
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
[tool.coverage.coverage_conditional_plugin.rules]
|
[tool.coverage.coverage_conditional_plugin.rules]
|
||||||
# Yes, the sense of all of these is inverted, because else it ends up
|
|
||||||
# inverted at *every* use.
|
|
||||||
sys-platform-win32 = "sys_platform != 'win32'"
|
sys-platform-win32 = "sys_platform != 'win32'"
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
@ -280,6 +278,12 @@ else: # pragma: sys-platform-not-win32
|
|||||||
Note the inverted sense of the pragma definitions, as the comments cause
|
Note the inverted sense of the pragma definitions, as the comments cause
|
||||||
`coverage` to *not* consider that code block on this platform.
|
`coverage` to *not* consider that code block on this platform.
|
||||||
|
|
||||||
|
As of 2022-10-02 and `coverage-conditional-plugin==0.7.0` there is no way to
|
||||||
|
signal that an entire file should be excluded from coverage reporting on the
|
||||||
|
current platform. See
|
||||||
|
[this GitHub issue comment](https://github.com/wemake-services/coverage-conditional-plugin/issues/2#issuecomment-1263918296)
|
||||||
|
.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Imports used only in core plugins
|
## Imports used only in core plugins
|
||||||
|
@ -15,8 +15,10 @@ omit = [ "tests/*", "venv/*", "dist.win32/*" ]
|
|||||||
plugins = [ "coverage_conditional_plugin" ]
|
plugins = [ "coverage_conditional_plugin" ]
|
||||||
|
|
||||||
[tool.coverage.coverage_conditional_plugin.rules]
|
[tool.coverage.coverage_conditional_plugin.rules]
|
||||||
# Yes, the sense of all of these is inverted, because else it ends up
|
# NB: The name versus content of all of these are inverted because of the way
|
||||||
# inverted at *every* use.
|
# they're used. When a pragma cites one it causes that code block to
|
||||||
|
# **NOT** be considered for code coverage.
|
||||||
|
# See Contributin.md#test-coverage for more details.
|
||||||
sys-platform-win32 = "sys_platform != 'win32'"
|
sys-platform-win32 = "sys_platform != 'win32'"
|
||||||
sys-platform-not-win32 = "sys_platform == 'win32'"
|
sys-platform-not-win32 = "sys_platform == 'win32'"
|
||||||
sys-platform-darwin = "sys_platform != 'darwin'"
|
sys-platform-darwin = "sys_platform != 'darwin'"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user