Skip to content

Commit

Permalink
Set a new fixture type
Browse files Browse the repository at this point in the history
  • Loading branch information
Abstract-X committed Sep 10, 2020
1 parent 632af5e commit dc013a0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pytest_mock/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,11 @@ def _mocker(pytestconfig: Any) -> Generator[MockerFixture, None, None]:
result.stopall()


mocker = pytest.yield_fixture()(_mocker) # default scope is function
class_mocker = pytest.yield_fixture(scope="class")(_mocker)
module_mocker = pytest.yield_fixture(scope="module")(_mocker)
package_mocker = pytest.yield_fixture(scope="package")(_mocker)
session_mocker = pytest.yield_fixture(scope="session")(_mocker)
mocker = pytest.fixture()(_mocker) # default scope is function
class_mocker = pytest.fixture(scope="class")(_mocker)
module_mocker = pytest.fixture(scope="module")(_mocker)
package_mocker = pytest.fixture(scope="package")(_mocker)
session_mocker = pytest.fixture(scope="session")(_mocker)


_mock_module_patches = [] # type: List[Any]
Expand Down

0 comments on commit dc013a0

Please sign in to comment.