test_ok2/src
Ran Benita 686f9e0720 fixtures: remove unneeded optimization from `_getnextfixturedef`
According to my understanding, this code, which handles obtaining the
relevant fixturedefs when a dynamic `getfixturevalue` is used, has an
optimization where it only grabs fixturedefs that are visible to the
*parent* of the item, instead of the item itself, under the assumption
that a fixturedef can't be visible to a single item, only to a
collector.

Remove this optimization for the following reasons:
- It doesn't save much (one loop iteration in `matchfactories`)
- It slightly complicates the complex fixtures code
- If some plugin wants to make a fixture visible only to a single item,
  why not let it?
- In the static case (`getfixtureclosure`), this optimization is not
  done (despite the confusing name `parentnode`, it is *not* the parent
  node). This is inconsistent.
2024-02-27 22:22:07 +02:00
..
_pytest fixtures: remove unneeded optimization from `_getnextfixturedef` 2024-02-27 22:22:07 +02:00
pytest Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
py.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00