Skip to content

Commit f54bd67

Browse files
author
James Souter
committed
Rework test_attribute_io_defaults
1 parent 316204d commit f54bd67

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_attribute.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from dataclasses import dataclass
22
from functools import partial
33
from typing import Generic, TypeVar
4-
from unittest.mock import call
54

65
import pytest
76
from 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

0 commit comments

Comments
 (0)