diff --git a/setup.cfg b/setup.cfg index 2229d24a007..4f60fcd1e9f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -115,11 +115,11 @@ tests = flake8-simplify>=0.14.0 flake8>=3.0.0 mypy>=0.910 - pytest-asyncio>=0.17 + # https://github.com/pytest-dev/pytest-asyncio/issues/655 + pytest-asyncio>=0.17,!=0.22.0 pytest-cov>=2.8.0 pytest-xdist>=2 pytest-env>=0.6.2 - pytest-mock>=3.6.1 pytest>=6 testfixtures>=6.11.0 towncrier>=23 diff --git a/tests/unit/test_id_cli.py b/tests/unit/test_id_cli.py index 4f1099b164b..7649e9fa0f2 100644 --- a/tests/unit/test_id_cli.py +++ b/tests/unit/test_id_cli.py @@ -35,9 +35,8 @@ @pytest.fixture -def mock_exists(mocker): - mock_exists = mocker.patch('pathlib.Path.exists') - mock_exists.return_value = True +def mock_exists(monkeypatch: pytest.MonkeyPatch): + monkeypatch.setattr('pathlib.Path.exists', lambda *a, **k: True) @pytest.fixture(scope='module')