Skip to content

Commit

Permalink
Add explicit iens to init mock
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Jan 2, 2024
1 parent 513c3e3 commit 48ac288
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/unit_tests/scheduler/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ def __init__(self, init=None, wait=None, kill=None):

async def _init(self, iens, *args, **kwargs):
if self._mock_init is not None:
await self._mock_init(*args, **kwargs)
return iens
if self._mock_init.__code__.co_argcount > 0:
await self._mock_init(iens, *args, **kwargs)
return iens
else:
await self._mock_init(*args, **kwargs)

async def _wait(self, iens):
if self._mock_wait is not None:
Expand Down

0 comments on commit 48ac288

Please sign in to comment.