| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…ures-per-test Previously, pytest --fixtures-per-test would display parameter names from @pytest.mark.parametrize decorators as if they were real fixtures, showing them with "no docstring available" and pointing to internal pytest code. This fix uses the existing _get_direct_parametrize_args() function to identify and exclude these pseudo-fixtures from the --fixtures-per-test output, ensuring only actual user-defined fixtures are displayed. Changes: - Modified _show_fixtures_per_test() to filter out parametrize arguments - Added regression test to verify pseudo-fixtures are excluded
|
There's #12129 already open for this (and linked in the issue) for what it's worth. On first sight, this seems a bit simpler, but I haven't looked into things in detail yet. |
Sorry, something went wrong.
|
@The-Compiler I see. Let me close this PR. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Previously, pytest --fixtures-per-test would display parameter names from @pytest.mark.parametrize decorators as if they were real fixtures, showing them with "no docstring available" and pointing to internal pytest code (_pytest/python.py).
This fix uses the existing _get_direct_parametrize_args() function to identify and exclude these pseudo-fixtures from the --fixtures-per-test output, ensuring only actual user-defined fixtures are displayed.
Example
Before this fix:
------------------ fixtures used by test_example[1] ------------------- real_fixture -- test_file.py:3 A real fixture. x -- .../_pytest/python.py:1110 ← Should not appear no docstring available
After this fix:
------------------ fixtures used by test_example[1] ------------------- real_fixture -- test_file.py:3 A real fixture.
Changes
Closes #11295