Skip to content

Commit

Permalink
use decoy better
Browse files Browse the repository at this point in the history
  • Loading branch information
sfoster1 committed Mar 14, 2024
1 parent 2f37b7a commit 459d23e
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -502,17 +502,6 @@ async def test_aspirate_volume_validation(
not_ok_volume = 1.01
expected_adjusted_volume = 1

decoy.when(
mock_command_note_adder(
cast(
CommandNote,
CommandNoteMatcher(
matching_noteKind_regex="warning",
matching_shortMessage_regex="Aspirate clamped to 1 µL",
),
)
)
).then_return(None)
for subject in [virtual_subject, hardware_subject]:
assert (
await subject.aspirate_in_place(
Expand All @@ -523,6 +512,17 @@ async def test_aspirate_volume_validation(
)
== expected_adjusted_volume
)
decoy.verify(
mock_command_note_adder(
cast(
CommandNote,
CommandNoteMatcher(
matching_noteKind_regex="warning",
matching_shortMessage_regex="Aspirate clamped to 1 µL",
),
)
)
)
with pytest.raises(InvalidAspirateVolumeError):
await subject.aspirate_in_place(
pipette_id="pipette-id",
Expand Down

0 comments on commit 459d23e

Please sign in to comment.