Skip to content

Releases: pytest-dev/pytest-mock

v3.14.0

21 Mar 22:14
Compare
Choose a tag to compare
  • #415: MockType and AsyncMockType can be imported from pytest_mock for type annotation purposes.
  • #420: Fixed a regression which would cause mocker.patch.object to not being properly cleared between tests.

v3.13.0

21 Mar 19:07
Compare
Choose a tag to compare
  • #417: spy now has spy_return_list, which is a list containing all the values returned by the spied function.
  • pytest-mock now requires pytest>=6.2.5.
  • #410: pytest-mock's setup.py file is removed.
    If you relied on this file, e.g. to install pytest using setup.py install,
    please see Why you shouldn't invoke setup.py directly for alternatives.

v3.12.0

19 Oct 16:26
Compare
Choose a tag to compare
  • Added support for Python 3.12.
  • Dropped support for EOL Python 3.7.
  • mocker.resetall() now also resets mocks created by mocker.create_autospec (#390).

v3.11.1

15 Jun 23:58
Compare
Choose a tag to compare
  • Fixed introspection for failed assert_has_calls (#365).

  • Updated type annotations for mocker.patch and mocker.spy (#364).

v3.10.0

05 Oct 18:53
Compare
Choose a tag to compare
  • Added new mocker.stop(m) method to stop specific mocker.patch or mocker.spy calls (#319).

v3.9.0

28 Sep 12:01
Compare
Choose a tag to compare
  • Expose NonCallableMagicMock via the mocker fixture (#318).

v3.8.2

05 Jul 12:51
Compare
Choose a tag to compare
  • Fixed AsyncMock support for Python 3.7+ in mocker.async_stub (#302).

v3.8.1

24 Jun 19:05
Compare
Choose a tag to compare
  • Fix regression caused by an explicit mock dependency in the code (#298).

v3.8.0

24 Jun 18:29
Compare
Choose a tag to compare
  • Add MockerFixture.async_mock method. Thanks @PerchunPak for the PR (#296).

3.7.0

28 Jan 11:41
Compare
Choose a tag to compare
  • Python 3.10 now officially supported.
  • Dropped support for Python 3.6.