Bump pytest from 7.4.4 to 8.0.1 (#4901)
* Bump pytest from 7.4.4 to 8.0.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.4 to 8.0.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.4.4...8.0.1) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Update pytest-asyncio to 0.23.5 * Set scope to function on fixture * Unthrottle by patching last call to prevent carryover --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stefan Agner <stefan@agner.ch> Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
This commit is contained in:
parent
1ececaaaa2
commit
d493ccde28
|
@ -2,10 +2,10 @@ coverage==7.4.3
|
|||
pre-commit==3.6.2
|
||||
pylint==3.1.0
|
||||
pytest-aiohttp==1.0.5
|
||||
pytest-asyncio==0.23.3
|
||||
pytest-asyncio==0.23.5
|
||||
pytest-cov==4.1.0
|
||||
pytest-timeout==2.2.0
|
||||
pytest==7.4.4
|
||||
pytest==8.0.1
|
||||
ruff==0.2.2
|
||||
time-machine==2.13.0
|
||||
typing_extensions==4.10.0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""Test supervisor object."""
|
||||
|
||||
from datetime import timedelta
|
||||
from datetime import datetime
|
||||
import errno
|
||||
from unittest.mock import AsyncMock, Mock, PropertyMock, patch
|
||||
|
||||
|
@ -23,7 +23,7 @@ from supervisor.resolution.data import Issue
|
|||
from supervisor.supervisor import Supervisor
|
||||
|
||||
|
||||
@pytest.fixture(name="websession")
|
||||
@pytest.fixture(name="websession", scope="function")
|
||||
async def fixture_webession(coresys: CoreSys) -> AsyncMock:
|
||||
"""Mock of websession."""
|
||||
mock_websession = AsyncMock()
|
||||
|
@ -36,10 +36,7 @@ async def fixture_webession(coresys: CoreSys) -> AsyncMock:
|
|||
@pytest.fixture(name="supervisor_unthrottled")
|
||||
async def fixture_supervisor_unthrottled(coresys: CoreSys) -> Supervisor:
|
||||
"""Get supervisor object with connectivity check throttle removed."""
|
||||
with patch(
|
||||
"supervisor.supervisor._check_connectivity_throttle_period",
|
||||
return_value=timedelta(),
|
||||
):
|
||||
with patch("supervisor.jobs.decorator.Job.last_call", return_value=datetime.min):
|
||||
yield coresys.supervisor
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue