2.0.0 (2020-01-04)
Breaking Changes
-
mocker.spy
attributes for tracking returned values and raised exceptions of its spied functions
are now calledspy_return
andspy_exception
, instead of reusing the existing
MagicMock
attributesreturn_value
andside_effect
.Version
1.13
introduced a serious regression: after a spied function usingmocker.spy
raises an exception, further calls to the spy will not call the spied function,
always raising the first exception instead: assigning toside_effect
causes
unittest.mock
to behave this way (#175). -
The deprecated
mock
alias to themocker
fixture has finally been removed.