Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export MonkeyPatch as pytest.MonkeyPatch #8006

Merged
merged 1 commit into from Nov 9, 2020

Commits on Nov 9, 2020

  1. Export MonkeyPatch as pytest.MonkeyPatch

    We want to export `pytest.MonkeyPatch` for the purpose of
    type-annotating the `monkeypatch` fixture. For other fixtures we export
    in this way, we also make direct construction of them (e.g.
    `MonkeyPatch()`) private. But unlike the others, `MonkeyPatch` is also
    widely used directly already, mostly because the `monkeypatch` fixture
    only works in `function` scope (issue pytest-dev#363), but also in other cases. So
    making it private will be annoying and we don't offer a decent
    replacement yet.
    
    So, let's just make direct construction public & documented.
    bluetech committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    6f13d1b View commit details
    Browse the repository at this point in the history