mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Ignore broad-exception-raised pylint warnings in tests (#119468)
This commit is contained in:
@ -328,7 +328,7 @@ async def test_component_exception_setup(hass: HomeAssistant) -> None:
|
||||
|
||||
def exception_setup(hass, config):
|
||||
"""Raise exception."""
|
||||
raise Exception("fail!")
|
||||
raise Exception("fail!") # pylint: disable=broad-exception-raised
|
||||
|
||||
mock_integration(hass, MockModule("comp", setup=exception_setup))
|
||||
|
||||
@ -342,7 +342,7 @@ async def test_component_base_exception_setup(hass: HomeAssistant) -> None:
|
||||
|
||||
def exception_setup(hass, config):
|
||||
"""Raise exception."""
|
||||
raise BaseException("fail!")
|
||||
raise BaseException("fail!") # pylint: disable=broad-exception-raised
|
||||
|
||||
mock_integration(hass, MockModule("comp", setup=exception_setup))
|
||||
|
||||
@ -362,6 +362,7 @@ async def test_component_setup_with_validation_and_dependency(
|
||||
"""Test that config is passed in."""
|
||||
if config.get("comp_a", {}).get("valid", False):
|
||||
return True
|
||||
# pylint: disable-next=broad-exception-raised
|
||||
raise Exception(f"Config not passed in: {config}")
|
||||
|
||||
platform = MockPlatform()
|
||||
|
Reference in New Issue
Block a user