github pytest-dev/pytest-mock v3.3.0
3.3.0 (2020-08-21)

latest releases: v3.14.0, v3.13.0, v3.12.0...
4 years ago
  • pytest-mock now includes inline type annotations and exposes them to user programs. The mocker fixture returns pytest_mock.MockerFixture, which can be used to annotate your tests:

    from pytest_mock import MockerFixture
    
    def test_foo(mocker: MockerFixture) -> None:
        ...

    The type annotations were developed against mypy version 0.782, the minimum version supported at the moment. If you run into an error that you believe to be incorrect, please open an issue.

    Many thanks to @staticdev for providing the initial patch #199.

Don't miss a new pytest-mock release

NewReleases is sending notifications on new releases.