mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Small improvement of yaml util tests (#103853)
This commit is contained in:
parent
6303366cf4
commit
1168956f8c
@ -70,7 +70,7 @@ def test_simple_dict(try_both_loaders) -> None:
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("hass_config_yaml", ["message:\n {{ states.state }}"])
|
@pytest.mark.parametrize("hass_config_yaml", ["message:\n {{ states.state }}"])
|
||||||
def test_unhashable_key(mock_hass_config_yaml: None) -> None:
|
def test_unhashable_key(try_both_loaders, mock_hass_config_yaml: None) -> None:
|
||||||
"""Test an unhashable key."""
|
"""Test an unhashable key."""
|
||||||
with pytest.raises(HomeAssistantError):
|
with pytest.raises(HomeAssistantError):
|
||||||
load_yaml_config_file(YAML_CONFIG_FILE)
|
load_yaml_config_file(YAML_CONFIG_FILE)
|
||||||
@ -538,7 +538,7 @@ def test_c_loader_is_available_in_ci() -> None:
|
|||||||
assert yaml.loader.HAS_C_LOADER is True
|
assert yaml.loader.HAS_C_LOADER is True
|
||||||
|
|
||||||
|
|
||||||
async def test_loading_actual_file_with_syntax(
|
async def test_loading_actual_file_with_syntax_error(
|
||||||
hass: HomeAssistant, try_both_loaders
|
hass: HomeAssistant, try_both_loaders
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test loading a real file with syntax errors."""
|
"""Test loading a real file with syntax errors."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user