File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
pylabrobot/liquid_handling Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 88import json
99import logging
1010import threading
11+ import unittest .mock
1112import warnings
1213from typing import (
1314 Any ,
@@ -290,6 +291,10 @@ def _check_args(
290291 The set of arguments that need to be removed from `backend_kwargs` before passing to `method`.
291292 """
292293
294+ # if method is an AsyncMock, skip the checks
295+ if isinstance (method , unittest .mock .AsyncMock ):
296+ return set ()
297+
293298 default_args = default .union ({"self" })
294299
295300 sig = inspect .signature (method )
Original file line number Diff line number Diff line change @@ -650,9 +650,9 @@ async def test_return_tips96(self):
650650 async def test_aspirate_dispense96 (self ):
651651 await self .lh .pick_up_tips96 (self .tip_rack )
652652 await self .lh .aspirate96 (self .plate , volume = 10 )
653- self .lh .backend .dispense96 = unittest .mock .AsyncMock ( ) # type: ignore
654- await self .lh .dispense96 (self .plate , volume = 10 )
655- self .lh .backend .dispense96 .assert_called_with (
653+ self .lh .backend .dispense96 = unittest .mock .create_autospec ( self . lh . backend . dispense96 ) # type: ignore
654+ await self .lh .dispense96 (self .plate , 10 )
655+ self .lh .backend .dispense96 .assert_called_with ( # type: ignore
656656 dispense = MultiHeadDispensePlate (
657657 wells = self .plate .get_all_items (),
658658 offset = Coordinate .zero (),
You can’t perform that action at this time.
0 commit comments