Python Test

What would you change about pytest?

03.08.2023 - By Brian OkkenPlay

Download our free app to listen on your phone

Download on the App StoreGet it on Google Play

Anthony Sottile and Brian discuss changes that would be cool for pytest, even unrealistic changes. These are changes we'd make to pytest if we didn't ahve to care about backwards compatibilty. Anthony's list:The import systemMulti-process support out of the boxAsync supportChanges to the fixture systemExtend the assert rewriting to make it modularAdd matchers to assert mechanismBan test class inheritanceBrian's list: Extend assert rewriting for custom rewriting, like checkpytester matchers available for all testsThrow out nose and unittest compatibility pluginsThrow out setup_module, teardown_module and other xunit style functionsRemove a bunch of the hook functionsDocumentation improvement of remaining hook functions which include examples of how to use itStart running tests before collection is doneSplit collection and running into two processesHave the fixtures be able to know the result of the test during teardown

Links:anthonywritescode - YouTubeanthonywritescode - Twitchpytest-asyncio · PyPIasync test patterns for pytestfuture-fstrings · PyPIre-assert · PyPInumpy.testingSourcegraph

More episodes from Python Test