-
- Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
topic: fixturesanything involving fixtures directly or indirectlyanything involving fixtures directly or indirectlytopic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errors
Description
With something like:
import pytest def test_one(monkeypatch): pass @pytest.mark.parametrize("x", [1, 2]) def test_two(x): passrunning pytest --fixtures-per-test results in:
-------------------------- fixtures used by test_one --------------------------- ----------------------------------- (x.py:4) ----------------------------------- monkeypatch -- .../_pytest/monkeypatch.py:30 A convenient fixture for monkey-patching. ------------------------- fixtures used by test_two[1] ------------------------- ----------------------------------- (x.py:7) ----------------------------------- x -- .../_pytest/fixtures.py:352 no docstring available ------------------------- fixtures used by test_two[2] ------------------------- ----------------------------------- (x.py:7) ----------------------------------- x -- .../_pytest/fixtures.py:352 no docstring available IMHO, the output for x should be excluded here - while it is technically a (pseudo) fixture internally, showing it like that is rather confusing for users. It doesn't make sense to show it as a fixture without a docstring which is "defined" here:
pytest/src/_pytest/fixtures.py
Lines 351 to 352 in d9bf9db
| def get_direct_param_fixture_func(request: "FixtureRequest") -> Any: | |
| return request.param |
Metadata
Metadata
Assignees
Labels
topic: fixturesanything involving fixtures directly or indirectlyanything involving fixtures directly or indirectlytopic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errors