Releases: pytest-dev/pytest-mock
Releases · pytest-dev/pytest-mock
v1.11.0: mocker.spy now also tracks return value
mocker.spy
now also tracks the return value.
mock.ANY
spy now supports classmethods and staticmethods
Thanks to @fogo, mocker.spy
can now prey upon staticmethods and classmethods. 😄
New spy and stub methods
Two new auxiliary methods, spy
and stub
. See README
for usage. (Thanks @fogo for complete PR!)
Mock and MagicMock
Mock
and MagicMock
are now accessible from the mocker
fixture, many thanks to @marcwebbie for the complete PR!
mocker and backward compatible mock fixture now return the same object
mocker
and backward compatiblemock
fixture now return the same object (#8). Many thanks to @RonnyPfannschmidt for the PR!
Wheels package no longer available
Small fix, no longer using wheel as an alternate package since it conditionally depends on mock
module based on Python version, as Python >= 3.3 already includes unittest.mock
. Many thanks to @The-Compiler for letting me know and providing a PR with the fix!
Using the same name for plugin as the module name
Small release that just uses pytest_mock
as the name of the plugin, instead of pytest-mock
: this makes it simple to depend on this plugin explicitly using pytest_plugins
module variable mechanism
"mock" fixture is dead, long live "mocker"
Bug fix release
- Fixed bug #2, where a patch would not be uninstalled correctly after patching the same object twice