Skip to content

Commit

Permalink
Publish MonkeyPatch for typing
Browse files Browse the repository at this point in the history
This builds on the work done in 2bcad38
to add `MonkeyPatch` to pytest's public API. This will allow users of
pytest to annotation their tests like

    def test_some_code(monkeypatch: MonkeyPatch) -> None:
        ...
  • Loading branch information
dirn committed Jul 6, 2020
1 parent ef62b86 commit 3893521
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pytest/__init__.py
Expand Up @@ -21,6 +21,7 @@
from _pytest.main import Session
from _pytest.mark import MARK_GEN as mark
from _pytest.mark import param
from _pytest.monkeypatch import MonkeyPatch
from _pytest.nodes import Collector
from _pytest.nodes import File
from _pytest.nodes import Item
Expand Down Expand Up @@ -76,6 +77,7 @@
"main",
"mark",
"Module",
"MonkeyPatch",
"Package",
"param",
"PytestAssertRewriteWarning",
Expand Down

0 comments on commit 3893521

Please sign in to comment.