Skip to content

Pytest parametrized case run gutter icon

This feature adds run gutter icons for individual pytest.mark.parametrize cases.

How to use it

Put each parametrized case on its own line, then use the gutter run icon beside the case to run only that pytest node.

import pytest

@pytest.mark.parametrize("value", [
    "admin",
    "guest",
])
def test_role(value):
    assert value
test_roles.py::test_role[guest]

Notes

  • The line marker appears only when BetterPy can infer the exact pytest case ID.
  • Explicit ids from ids=[...] and pytest.param(..., id="...") are supported.
  • The feature is gated by the Pytest parametrized case run gutter icon setting under Settings | BetterPy | Testing (Pytest) | Parametrize.