File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11from dataclasses import dataclass
22from functools import partial
33from typing import Generic , TypeVar
4- from unittest .mock import call
54
65import pytest
76from pytest_mock import MockerFixture
@@ -249,12 +248,13 @@ async def update(self, attr):
249248 await c .no_ref .update ()
250249
251250 process_spy = mocker .spy (c .no_ref , "update_display_without_process" )
252- await c .no_ref .process (40 )
251+ # calls callback which calls update_display_without_process
252+ # TODO: reconsider if this is what we want the default case to be
253+ # as process already calls that
254+ await c .no_ref .process_without_display_update (40 )
253255 process_spy .assert_called_with (40 )
254256
255- # this is correct, but we want to reconsider this logic, it seems wasteful to
256- # call update_display twice...
257- assert process_spy .call_args_list == [call (40 ), call (40 )]
257+ process_spy .assert_called_once_with (40 )
258258
259259 c2 = MyController (ios = [SimpleAttributeIO ()])
260260
You can’t perform that action at this time.
0 commit comments