Listen "125: pytest 6 - Anthony Sottile"
Episode Synopsis
pytest 6 is out. Specifically, 6.0.1, as of July 31. And there's lots to be excited about. Anthony Sottile joins the show to discuss features, improvements, documentation updates and more.Full release notes / changelogSome of what we talk about:How to update (at least, how I do it) Run your test suites with 5.4.3 or whatever the last version you were usingUpdate to 6Run again. Same output? Probably good.If there are any warnings, maybe fix those.You can also run with pytest -W error to turn warnings into errors.Then find out all the cool stuff you can do nowNew Features pytest now supports pyproject.toml files for configuration. but remember, toml syntax is different than ini files. mostly quotes are needed pytest now includes inline type annotations and exposes them to user programs. Most of the user-facing API is covered, as well as internal code.New command-line flags --no-header and --no-summaryA warning is now shown when an unknown key is read from a config INI file. The --strict-config flag has been added to treat these warnings as errors.New required_plugins configuration option allows the user to specify a list of plugins, including version information, that are required for pytest to run. An error is raised if any required plugins are not found when running pytest.Improvements You can now pass output to things like less and head that close the pipe passed to them. thank you!!!Improved precision of test durations measurement. use --durations=10 -vv to capture and show durationsRich comparison for dataclasses and attrs-classes is now recursive.pytest --version now displays just the pytest version, while pytest --version --version displays more verbose information including plugins. --junitxml now includes the exception cause in the message XML attribute for failures during setup and teardown.Improved Documentation Add a note about --strict and --strict-markers and the preference for the latter one.Explain indirect parametrization and markers for fixtures.Bug FixesDeprecationsTrivial/Internal ChangesBreaking Changes you might need to care about before upgrading PytestDeprecationWarning are now errors by default. Check the deprecations and removals page if you are curious.-k and -m internals were rewritten to stop using eval(), this results in a few slight changes but overall makes them much more consistenttestdir.run().parseoutcomes() now always returns the parsed nouns in plural form. I'd say that's an improvementSpecial Guest: Anthony Sottile.Links:pytest Changelog / Release NotesDeprecations and Removals — pytest documentation
More episodes of the podcast Test & Code
238: So Long, and Thanks for All the Fish
15/08/2025
237: FastAPI Cloud - Sebastián Ramírez
11/08/2025
236: Git Tips for Testing - Adam Johnson
30/07/2025
235: pytest-django - Adam Johnson
22/07/2025
ZARZA We are Zarza, the prestigious firm behind major projects in information technology.