preparing a set of breaking changes
Hi everyone, 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 * 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 * removal of the dozns and dozens of compat properties/hackish aliases across the codebase -> 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 -- Ronny
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
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
Ohhh removal of yield tests is great. I think I have a memory-use reduction commit that broke for yield tests :) On Sun, Apr 8, 2018 at 5:40 AM, Floris Bruynooghe <flub@devork.be> wrote:
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 _______________________________________________ pytest-dev mailing list pytest-dev@python.org https://mail.python.org/mailman/listinfo/pytest-dev
On Sun, 8 Apr 2018, RonnyPfannschmidt wrote:
* 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
Not saying it's wrong to see them go, but back in perhaps 2010 (not really sure of the exact time) pytest's yield tests are what made me fall in love with pytest. That was back when pytest was still a thing that did some collecting of stuff named 'test_*' that has 'assert' calls in it, and not much else. I loved that. All the fixtures, decorators, etc that we have now are nicely powerful and useful, but back when you couldn't do much in tests it meant that during TDD you couldn't do much in code either, and that was a great thing. /me raises a glass to yield tests, bon voyage -- Chris Dent ٩◔̯◔۶ https://anticdent.org/ freenode: cdent tw: @anticdent
in 2010 yield tests where likely still working correctly they where fundamentally broken ever since pytest introduced the collection phase -- Ronny 2018-04-11 12:46 GMT+02:00 Chris Dent <cdent@anticdent.org>:
On Sun, 8 Apr 2018, RonnyPfannschmidt wrote:
* 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
Not saying it's wrong to see them go, but back in perhaps 2010 (not really sure of the exact time) pytest's yield tests are what made me fall in love with pytest.
That was back when pytest was still a thing that did some collecting of stuff named 'test_*' that has 'assert' calls in it, and not much else.
I loved that. All the fixtures, decorators, etc that we have now are nicely powerful and useful, but back when you couldn't do much in tests it meant that during TDD you couldn't do much in code either, and that was a great thing.
/me raises a glass to yield tests, bon voyage
-- Chris Dent ٩◔̯◔۶ https://anticdent.org/ freenode: cdent tw: @anticdent _______________________________________________ pytest-dev mailing list pytest-dev@python.org https://mail.python.org/mailman/listinfo/pytest-dev
-- Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric Shander
participants (5)
-
Chris Dent -
Dan Nealschneider -
Floris Bruynooghe -
Ronny Pfannschmidt -
RonnyPfannschmidt