diff options
author | Ran Benita <ran@unusedvar.com> | 2021-01-14 11:58:59 +0200 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2021-01-14 18:07:25 +0200 |
commit | 7f989203ed58119bf63e026cbb99df274c7700d6 (patch) | |
tree | e91ba643bf2c25d3fe4b51881a164de20018c927 /setup.py | |
parent | 3dde519f53b4480a3b30d58a1c71ca4505ae5ff7 (diff) | |
download | pytest-7f989203ed58119bf63e026cbb99df274c7700d6.tar.gz |
Improve way in which skip location is fixed up when skipped by mark
When `pytest.skip()` is called inside a test function, the skip location
should be reported as the line that made the call, however when
`pytest.skip()` is called by the `pytest.mark.skip` and similar
mechanisms, the location should be reported at the item's location,
because the exact location is some irrelevant internal code.
Currently the item-location case is implemented by the caller setting a
boolean key on the item's store and the `skipping` plugin checking it
and fixing up the location if needed. This is really roundabout IMO and
breaks encapsulation.
Instead, allow the caller to specify directly on the skip exception
whether to use the item's location or not. For now, this is entirely
private.
Diffstat (limited to 'setup.py')
0 files changed, 0 insertions, 0 deletions