Ignore broad-exception-raised pylint warnings in tests (#119468)
This commit is contained in:
parent
0c79eeabdf
commit
2a7e78a80f
12 changed files with 18 additions and 11 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue