Skip to content

Commit

Permalink
rename functions to match proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-kulkarni committed Jul 3, 2024
1 parent f890a42 commit 213bc82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_api/instrument_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -2067,7 +2067,7 @@ def detect_liquid_presence(self, well: labware.Well) -> bool:
raise e

@requires_version(2, 20)
def require_liquid(self, well: labware.Well) -> None:
def require_liquid_presence(self, well: labware.Well) -> None:
"""If there is no liquid in a well, raise an error.
:returns: None.
Expand Down
8 changes: 4 additions & 4 deletions api/tests/opentrons/protocol_api/test_instrument_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ def test_detect_liquid_presence(


@pytest.mark.parametrize("api_version", [APIVersion(2, 20)])
def test_require_liquid(
def test_require_liquid_presence(
decoy: Decoy,
mock_instrument_core: InstrumentCore,
subject: InstrumentContext,
Expand All @@ -1296,12 +1296,12 @@ def test_require_liquid(
"""It should raise an exception when called."""
mock_well = decoy.mock(cls=Well)
decoy.when(mock_instrument_core.find_liquid_level(mock_well._core))
subject.require_liquid(mock_well)
subject.require_liquid_presence(mock_well)
decoy.when(mock_instrument_core.find_liquid_level(mock_well._core)).then_raise(
PipetteLiquidNotFoundError()
)
with pytest.raises(PipetteLiquidNotFoundError):
subject.require_liquid(mock_well)
subject.require_liquid_presence(mock_well)


@pytest.mark.parametrize("api_version", [APIVersion(2, 20)])
Expand All @@ -1317,4 +1317,4 @@ def test_measure_liquid_height(
PipetteLiquidNotFoundError()
)
with pytest.raises(PipetteLiquidNotFoundError):
subject.require_liquid(mock_well)
subject.measure_liquid_height(mock_well)

0 comments on commit 213bc82

Please sign in to comment.