Skip to content

Commit

Permalink
chore(api): fix some decoy warnings in engine tests (#17579)
Browse files Browse the repository at this point in the history
Title says it all. These invocations didn't keep up with a refactor:

Tests only.
  • Loading branch information
sfoster1 authored Feb 25, 2025
1 parent 16d00ac commit c23c95c
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions api/tests/opentrons/protocol_engine/commands/test_load_module.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test load module command."""

from typing import cast
import pytest
from decoy import Decoy
@@ -42,27 +43,45 @@


@pytest.mark.parametrize(
"module_model,module_def_fixture_name,load_slot_name",
"module_model,module_def_fixture_name,load_slot_name,addressable_area_name",
[
(ModuleModel.TEMPERATURE_MODULE_V2, "tempdeck_v2_def", DeckSlotName.SLOT_D1),
(ModuleModel.MAGNETIC_BLOCK_V1, "mag_block_v1_def", DeckSlotName.SLOT_D1),
(
ModuleModel.TEMPERATURE_MODULE_V2,
"tempdeck_v2_def",
DeckSlotName.SLOT_D1,
"temperatureModuleV2D1",
),
(
ModuleModel.MAGNETIC_BLOCK_V1,
"mag_block_v1_def",
DeckSlotName.SLOT_D1,
"magneticBlockV1D1",
),
(
ModuleModel.THERMOCYCLER_MODULE_V2,
"thermocycler_v2_def",
# only B1 provides addressable area for thermocycler v2
# so we use it here with decoy
DeckSlotName.SLOT_B1,
"thermocyclerModuleV2B1",
),
(
ModuleModel.HEATER_SHAKER_MODULE_V1,
"heater_shaker_v1_def",
DeckSlotName.SLOT_D3,
"heaterShakerModuleV1D3",
),
(
ModuleModel.ABSORBANCE_READER_V1,
"abs_reader_v1_def",
DeckSlotName.SLOT_D3,
"absorbanceReaderV1D3",
),
(ModuleModel.ABSORBANCE_READER_V1, "abs_reader_v1_def", DeckSlotName.SLOT_D3),
(
ModuleModel.FLEX_STACKER_MODULE_V1,
"flex_stacker_v1_def",
DeckSlotName.SLOT_D3,
"flexStackerModuleV1D4",
),
],
)
@@ -75,6 +94,7 @@ async def test_load_module_implementation(
module_model: ModuleModel,
module_def_fixture_name: str,
load_slot_name: DeckSlotName,
addressable_area_name: str,
) -> None:
"""A loadModule command should have an execution implementation."""
module_definition = request.getfixturevalue(module_def_fixture_name)
@@ -96,7 +116,7 @@ async def test_load_module_implementation(

decoy.when(
state_view.geometry.ensure_location_not_occupied(
DeckSlotLocation(slotName=load_slot_name)
DeckSlotLocation(slotName=load_slot_name), addressable_area_name
)
).then_return(DeckSlotLocation(slotName=load_slot_name))

0 comments on commit c23c95c

Please sign in to comment.