Skip to content

Commit 8524c82

Browse files
committed
tests: reimplement test for attribute not found error
1 parent 78e77b9 commit 8524c82

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_controllers.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,3 +486,17 @@ async def test_top_level_frame_processor_commands_raise_exception(
486486

487487
with pytest.raises(AttributeError, match="does not have"):
488488
await fpac.start_writing()
489+
490+
491+
@pytest.mark.asyncio
492+
async def test_status_summary_updater_raises_exception_if_attribute_not_found():
493+
controller = Controller()
494+
sub_controller = Controller()
495+
496+
controller.add_sub_controller("OD", sub_controller)
497+
498+
controller.writing = AttrR(
499+
Bool(), StatusSummaryAttributeIORef(["OD"], "some_attribute", any)
500+
)
501+
with pytest.raises(KeyError, match=r"Sub controller .* does not have attribute"):
502+
initialise_summary_attributes(controller)

0 commit comments

Comments
 (0)