Hi everyone,
in https://github.com/pytest-dev/pytest/pull/5975 i have startet to
prepare a POC with a ambitious goal,
i want to remove much of the mind boggling smartness from the constructors
and i want to streamline note constructors in order to reduce the
coupling in the different types of nodes.
The tight coupling and tricky construction of nodes has repeatedly
foiled my attempts to refactor both fixtures/fixture caching and
setupstate as well as
actually introducing FunctionDefinition in the public api (and shifting
generate_tests to it) and retiring Instance.
So from my pov its not sustainable to leave them be, as they prevent
other required improvements.
However as far as i can tell its next to impossible without breaking things.
The Rough idea i have for iteratively solving it is to
a) introduce Node.from_parent as the convention for node construction
b) deprecate Node.__init__ being invoked outside of such a function
c) destroy all the things and have a cupcake
Whats needed in addition is a slightly more eloquent version of the
description for the documentation.
-- Ronny
_______________________________________________
pytest-dev mailing list
pytest-dev@python.org
https://mail.python.org/mailman/listinfo/pytest-dev