Skip to content

Commit

Permalink
Merge pull request #209 from Abstract-X/change-fixture-type
Browse files Browse the repository at this point in the history
Set a new fixture type
  • Loading branch information
nicoddemus committed Sep 10, 2020
2 parents 632af5e + dc013a0 commit bd8f613
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pytest_mock/plugin.py
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 bd8f613

Please sign in to comment.