[pytest-dev] preparing a set of breaking changes

Floris Bruynooghe flub at devork.be
Sun Apr 8 08:40:14 EDT 2018


Hi Ronny,

On Sun 08 Apr 2018 at 12:28 +0200, RonnyPfannschmidt wrote:
> i wold like to get started with a long needed spring cleaning of things
> that are unfixable stange/broken since dozens of years
>
> * removal of yield tests, ever since collection and test running are no
> longer connected, their setupstate has been fundamentally broken for
> anything but test so simple, one should use parametrize

Sounds good!  Do we already have deprecation warnings for this?  If not
should we add them ASAP?

> * removal of the pytest namespace hook and setting up the pytest config
> in a way that is actially correct on xdist (currently pytest-xdist is
> unable to create config objects on workers in a consistent manner,
> and we leak data in strange ways

I guess pytest_namespace was nice for internal plugins but does not
really scale to many external plugins.  I used to be against this but
maybe you're right.  Anyway, need to start deprecating this right away
if we want to do this!

> * removal of the dozns and dozens of compat properties/hackish aliases
> across the codebase

Sounds great, modulo the deprecation warnings thing.

>   -> getting rid of customclasses on collectors
> * after the mark merge: introduce an actual FunctionDefinition node
> that's visible in the collection tree and ensure metafunc uses that as
> base for parameterization,
> * detangle node construction - the amount of spaghetti, in particular
> wrt sessions, fs collectors & co has an unbearable amount of stones in
> it for unit and functional testing

This all sounds worthwhile.


Cheers,
Floris


More information about the pytest-dev mailing list