change mock (so that mypy understands it)
This commit is contained in:
parent
f0b77c95c8
commit
dc1bfcbfd7
@ -20,12 +20,12 @@ def get_printer() -> Dummy:
|
|||||||
|
|
||||||
|
|
||||||
@given(text=st.text())
|
@given(text=st.text())
|
||||||
def test_text(text: str) -> None:
|
def test_text(text: str):
|
||||||
"""Test that text() calls the MagicEncode object."""
|
"""Test that text() calls the MagicEncode object."""
|
||||||
instance = get_printer()
|
instance = get_printer()
|
||||||
instance.magic.write = mock.Mock()
|
with mock.patch.object(instance.magic, "write") as write:
|
||||||
instance.text(text)
|
instance.text(text)
|
||||||
instance.magic.write.assert_called_with(text)
|
write.assert_called_with(text)
|
||||||
|
|
||||||
|
|
||||||
def test_block_text() -> None:
|
def test_block_text() -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user