Sourced from pytest's releases.
6.1.0
pytest 6.1.0 (2020-09-26)
Breaking Changes
#5585: As per our policy, the following features which have been deprecated in the 5.X series are now removed:
- The
funcargnames
read-only property ofFixtureRequest
,Metafunc
, andFunction
classes. Usefixturenames
attribute.@pytest.fixture
no longer supports positional arguments, pass all arguments by keyword instead.- Direct construction of
Node
subclasses now raise an error, usefrom_parent
instead.- The default value for
junit_family
has changed toxunit2
. If you require the old format, addjunit_family=xunit1
to your configuration file.- The
TerminalReporter
no longer has awriter
attribute. Plugin authors may use the public functions of theTerminalReporter
instead of accessing theTerminalWriter
object directly.- The
--result-log
option has been removed. Users are recommended to use the pytest-reportlog plugin instead.For more information consult Deprecations and Removals in the docs.
Deprecations
#6981: The
pytest.collect
module is deprecated: all its names can be imported frompytest
directly.#7097: The
pytest._fillfuncargs
function is deprecated. This function was kept for backward compatibility with an older plugin.It's functionality is not meant to be used directly, but if you must replace it, use function._request._fillfixtures() instead, though note this is not a public API and may break in the future.
#7210: The special
-k '-expr'
syntax to-k
is deprecated. Use-k 'not expr'
instead.The special
-k 'expr:'
syntax to-k
is deprecated. Please open an issue if you use this and want a replacement.#7255: The pytest_warning_captured <_pytest.hookspec.pytest_warning_captured> hook is deprecated in favor of pytest_warning_recorded <_pytest.hookspec.pytest_warning_recorded>, and will be removed in a future version.
#7648: The
gethookproxy()
andisinitpath()
methods ofFSCollector
andPackage
are deprecated; useself.session.gethookproxy()
andself.session.isinitpath()
instead. This should work on all pytest versions.Features
- #7667: New
--durations-min
command-line flag controls the minimal duration for inclusion in the slowest list of tests shown by--durations
. Previously this was hard-coded to0.005s
.Improvements
Sourced from pytest's changelog.
868bc00
Prepare release version 6.1.00b327cc
Merge pull request #7796 from bluetech/changelog-cleanupsd3c746e
changelog: some consistency cleanupsd3f47bf
Improved 'Declaring new hooks' section in docs. (#7782)3db2489
Merge pull request #7784 from nicoddemus/use-new-pip-solver-77838215625
Use new pip resolver in plugins tox env5cfd7c0
Merge pull request #7780 from bluetech/finala99ca87
Mark some public and to-be-public classes as @final
050c2df
Use multiple issue template types and mention Discussions (#7739)cdfdb3a
Add docs about reusing fixtures from other projects (#7772)