Pytest mark completion¶
Pytest mark completion suggests known pytest markers in pytest.mark contexts.
How to use it¶
Invoke completion after pytest.mark. in a test file.
Where the markers come from¶
- Pytest's built-in markers, such as
skip,skipif,xfail,parametrize, andusefixtures. - Markers registered in your project configuration under
markers = ...inpyproject.toml,pytest.ini, orsetup.cfg. - Markers contributed by installed pytest plugins, taken from BetterPy's pytest collection snapshot.
Built-in and configured markers are suggested immediately, without waiting for a pytest collection run. Each lookup entry shows the marker description and, for plugin markers, the contributing plugin.
Related marker support¶
The same marker knowledge also drives go-to-declaration and rename for a marker name, a gutter icon on marker declarations, quick documentation for marker usages, and the Unknown pytest marker in strict mode inspection.
Notes¶
- Completion is offered only in real marker positions.
import pytest,import pytest as pt, andfrom pytest import markare recognised; unrelated decorators and a local object namedpytestare ignored. - The feature is gated by the Pytest mark completion setting.