From be331b73d8b2bb49b25f5d3adc8481a42dae5727 Mon Sep 17 00:00:00 2001 From: NinosMan Date: Fri, 10 Apr 2026 14:16:54 +1200 Subject: [PATCH] test: cover abstract method pass lines for 100% coverage --- tests/test_integration.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/test_integration.py b/tests/test_integration.py index 89342a5..e1f003a 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -550,3 +550,39 @@ async def execute(self, inputs, context): return ActionResult(data={"greeting": "second"}) assert integration._action_handlers["test_action"] is Second + + +# ── Abstract base class pass-through ─────────────────────────────────────── + + +async def test_action_handler_abstract_execute_returns_none(): + """super().execute() on the ABC body executes the `pass` and returns None.""" + + class Concrete(ActionHandler): + async def execute(self, inputs, context): + return await super().execute(inputs, context) + + result = await Concrete().execute({}, None) + assert result is None + + +async def test_polling_trigger_handler_abstract_poll_returns_none(): + """super().poll() on the ABC body executes the `pass` and returns None.""" + + class Concrete(PollingTriggerHandler): + async def poll(self, inputs, last_poll_ts, context): + return await super().poll(inputs, last_poll_ts, context) + + result = await Concrete().poll({}, None, None) + assert result is None + + +async def test_connected_account_handler_abstract_get_account_info_returns_none(): + """super().get_account_info() on the ABC body executes the `pass` and returns None.""" + + class Concrete(ConnectedAccountHandler): + async def get_account_info(self, context): + return await super().get_account_info(context) + + result = await Concrete().get_account_info(None) + assert result is None