file /home/aegis/.cache/uv/builds-v0/.tmpsi0712/lib/python3.12/site-packages/pytest_bdd/scenario.py, line 296
def scenario_wrapper(request: FixtureRequest, _pytest_bdd_example: dict[str, str]) -> Any:
E fixture 'docstring' not found
> available fixtures: _pytest_bdd_example, abort_on_fail, anyio_backend, anyio_backend_name, anyio_backend_options, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, context, doctest_namespace, event_loop, free_tcp_port, free_tcp_port_factory, free_udp_port, free_udp_port_factory, interface_tester, loki_charm, loki_container, monkeypatch, ops_test, pytestbdd_stepdef_given_rules, pytestbdd_stepdef_given_trace, pytestbdd_stepdef_then_modified rules match, pytestbdd_stepdef_then_trace, pytestbdd_stepdef_when_extra labels are injected, pytestbdd_stepdef_when_trace, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, unused_tcp_port, unused_tcp_port_factory, unused_udp_port, unused_udp_port_factory
> use 'pytest --fixtures [testpath]' for help on them.
/home/aegis/.cache/uv/builds-v0/.tmpsi0712/lib/python3.12/site-packages/pytest_bdd/scenario.py:296
Scenario: Empty extra labels leaves rules unchanged
Given rules
"""
groups:
- rules:
- labels:
severity: warning
team: some-team
"""
When extra labels are injected
"""
"""
Then modified rules match
"""
groups:
- rules:
- labels:
severity: warning
team: some-team
"""
Describe the bug
I have a couple scenarios that reuse the same test methods.
In one of my "When"s, I attempt to pass an empty docstring.
As a result, pytest-bdd complains for that particular test that the docstring fixture does not exist.
To Reproduce
Expected behavior
I expected the docstring fixture to contain the the empty string,
"".Additional context
As a workaround, I changed the docstring to
""" +--- """Version