mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Update pytest to 8.4.0 (#146114)
This commit is contained in:
parent
e3f7e5706b
commit
a8ccf1c6fc
@ -492,6 +492,7 @@ asyncio_mode = "auto"
|
|||||||
asyncio_default_fixture_loop_scope = "function"
|
asyncio_default_fixture_loop_scope = "function"
|
||||||
filterwarnings = [
|
filterwarnings = [
|
||||||
"error::sqlalchemy.exc.SAWarning",
|
"error::sqlalchemy.exc.SAWarning",
|
||||||
|
"error:usefixtures\\(\\) in .* without arguments has no effect:UserWarning", # pytest
|
||||||
|
|
||||||
# -- HomeAssistant - aiohttp
|
# -- HomeAssistant - aiohttp
|
||||||
# Overwrite web.Application to pass a custom default argument to _make_request
|
# Overwrite web.Application to pass a custom default argument to _make_request
|
||||||
|
@ -30,7 +30,7 @@ pytest-timeout==2.4.0
|
|||||||
pytest-unordered==0.6.1
|
pytest-unordered==0.6.1
|
||||||
pytest-picked==0.5.1
|
pytest-picked==0.5.1
|
||||||
pytest-xdist==3.7.0
|
pytest-xdist==3.7.0
|
||||||
pytest==8.3.5
|
pytest==8.4.0
|
||||||
requests-mock==1.12.1
|
requests-mock==1.12.1
|
||||||
respx==0.22.0
|
respx==0.22.0
|
||||||
syrupy==4.9.1
|
syrupy==4.9.1
|
||||||
|
@ -1866,7 +1866,7 @@ async def test_exception_platform_pre(hass: HomeAssistant) -> None:
|
|||||||
BackupManagerExceptionGroup,
|
BackupManagerExceptionGroup,
|
||||||
(
|
(
|
||||||
"Multiple errors when creating backup: Error during pre-backup: Boom, "
|
"Multiple errors when creating backup: Error during pre-backup: Boom, "
|
||||||
"Error during post-backup: Test exception (2 sub-exceptions)"
|
"Error during post-backup: Test exception"
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@ -1874,7 +1874,7 @@ async def test_exception_platform_pre(hass: HomeAssistant) -> None:
|
|||||||
BackupManagerExceptionGroup,
|
BackupManagerExceptionGroup,
|
||||||
(
|
(
|
||||||
"Multiple errors when creating backup: Error during pre-backup: Boom, "
|
"Multiple errors when creating backup: Error during pre-backup: Boom, "
|
||||||
"Error during post-backup: Test exception (2 sub-exceptions)"
|
"Error during post-backup: Test exception"
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -28,9 +28,8 @@ from homeassistant.util.dt import UTC
|
|||||||
|
|
||||||
from . import init_integration
|
from . import init_integration
|
||||||
|
|
||||||
pytestmark = pytest.mark.usefixtures("mock_setup_entry")
|
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("mock_setup_entry")
|
||||||
async def test_form(hass: HomeAssistant) -> None:
|
async def test_form(hass: HomeAssistant) -> None:
|
||||||
"""Test we get the forms."""
|
"""Test we get the forms."""
|
||||||
|
|
||||||
@ -74,6 +73,7 @@ async def test_form(hass: HomeAssistant) -> None:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("mock_setup_entry")
|
||||||
async def test_form_province_no_alias(hass: HomeAssistant) -> None:
|
async def test_form_province_no_alias(hass: HomeAssistant) -> None:
|
||||||
"""Test we get the forms."""
|
"""Test we get the forms."""
|
||||||
|
|
||||||
@ -115,6 +115,7 @@ async def test_form_province_no_alias(hass: HomeAssistant) -> None:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("mock_setup_entry")
|
||||||
async def test_form_no_country(hass: HomeAssistant) -> None:
|
async def test_form_no_country(hass: HomeAssistant) -> None:
|
||||||
"""Test we get the forms correctly without a country."""
|
"""Test we get the forms correctly without a country."""
|
||||||
|
|
||||||
@ -154,6 +155,7 @@ async def test_form_no_country(hass: HomeAssistant) -> None:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("mock_setup_entry")
|
||||||
async def test_form_no_subdivision(hass: HomeAssistant) -> None:
|
async def test_form_no_subdivision(hass: HomeAssistant) -> None:
|
||||||
"""Test we get the forms correctly without subdivision."""
|
"""Test we get the forms correctly without subdivision."""
|
||||||
|
|
||||||
@ -196,6 +198,7 @@ async def test_form_no_subdivision(hass: HomeAssistant) -> None:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("mock_setup_entry")
|
||||||
async def test_options_form(hass: HomeAssistant) -> None:
|
async def test_options_form(hass: HomeAssistant) -> None:
|
||||||
"""Test we get the form in options."""
|
"""Test we get the form in options."""
|
||||||
|
|
||||||
@ -242,6 +245,7 @@ async def test_options_form(hass: HomeAssistant) -> None:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("mock_setup_entry")
|
||||||
async def test_form_incorrect_dates(hass: HomeAssistant) -> None:
|
async def test_form_incorrect_dates(hass: HomeAssistant) -> None:
|
||||||
"""Test errors in setup entry."""
|
"""Test errors in setup entry."""
|
||||||
|
|
||||||
@ -314,6 +318,7 @@ async def test_form_incorrect_dates(hass: HomeAssistant) -> None:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("mock_setup_entry")
|
||||||
async def test_options_form_incorrect_dates(hass: HomeAssistant) -> None:
|
async def test_options_form_incorrect_dates(hass: HomeAssistant) -> None:
|
||||||
"""Test errors in options."""
|
"""Test errors in options."""
|
||||||
|
|
||||||
@ -390,6 +395,7 @@ async def test_options_form_incorrect_dates(hass: HomeAssistant) -> None:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("mock_setup_entry")
|
||||||
async def test_options_form_abort_duplicate(hass: HomeAssistant) -> None:
|
async def test_options_form_abort_duplicate(hass: HomeAssistant) -> None:
|
||||||
"""Test errors in options for duplicates."""
|
"""Test errors in options for duplicates."""
|
||||||
|
|
||||||
@ -443,6 +449,7 @@ async def test_options_form_abort_duplicate(hass: HomeAssistant) -> None:
|
|||||||
assert result2["errors"] == {"base": "already_configured"}
|
assert result2["errors"] == {"base": "already_configured"}
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("mock_setup_entry")
|
||||||
async def test_form_incorrect_date_range(hass: HomeAssistant) -> None:
|
async def test_form_incorrect_date_range(hass: HomeAssistant) -> None:
|
||||||
"""Test errors in setup entry."""
|
"""Test errors in setup entry."""
|
||||||
|
|
||||||
@ -515,6 +522,7 @@ async def test_form_incorrect_date_range(hass: HomeAssistant) -> None:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("mock_setup_entry")
|
||||||
async def test_options_form_incorrect_date_ranges(hass: HomeAssistant) -> None:
|
async def test_options_form_incorrect_date_ranges(hass: HomeAssistant) -> None:
|
||||||
"""Test errors in options."""
|
"""Test errors in options."""
|
||||||
|
|
||||||
@ -591,9 +599,6 @@ async def test_options_form_incorrect_date_ranges(hass: HomeAssistant) -> None:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pytestmark = pytest.mark.usefixtures()
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("language", "holiday"),
|
("language", "holiday"),
|
||||||
[
|
[
|
||||||
|
@ -5,6 +5,7 @@ from http import HTTPStatus
|
|||||||
import pathlib
|
import pathlib
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
|
from _pytest.compat import get_real_func
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
import pytest
|
import pytest
|
||||||
import pytest_socket
|
import pytest_socket
|
||||||
@ -100,7 +101,7 @@ async def test_evict_faked_translations(hass: HomeAssistant, translations_once)
|
|||||||
|
|
||||||
# The evict_faked_translations fixture has module scope, so we set it up and
|
# The evict_faked_translations fixture has module scope, so we set it up and
|
||||||
# tear it down manually
|
# tear it down manually
|
||||||
real_func = evict_faked_translations.__pytest_wrapped__.obj
|
real_func = get_real_func(evict_faked_translations)
|
||||||
gen: Generator = real_func(translations_once)
|
gen: Generator = real_func(translations_once)
|
||||||
|
|
||||||
# Set up the evict_faked_translations fixture
|
# Set up the evict_faked_translations fixture
|
||||||
|
Loading…
x
Reference in New Issue
Block a user