Skip to content

Commit

Permalink
tests: Ignore untyped mock.patch(side_effect=) functions
Browse files Browse the repository at this point in the history
These are just not worth the effort to properly annotate!
  • Loading branch information
JonathonReinhart committed Mar 25, 2024
1 parent 3635f87 commit dc7b8e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_dockerutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_get_image_command_bad_image() -> None:
def test_get_image_no_docker() -> None:
"""get_image_command raises an exception if docker is not installed"""

def mocked_run(args, real_run=subprocess.run, **kw):
def mocked_run(args, real_run=subprocess.run, **kw): # type: ignore[no-untyped-def]
assert args[0] == "docker"
args[0] = "dockerZZZZ"
return real_run(args, **kw)
Expand All @@ -34,7 +34,7 @@ def mocked_run(args, real_run=subprocess.run, **kw):


def _test_get_images(stdout: str, returncode: int = 0) -> Sequence[str]:
def mocked_run(*args, **kwargs):
def mocked_run(*args, **kwargs): # type: ignore[no-untyped-def]
mock_obj = mock.MagicMock()
mock_obj.returncode = returncode
mock_obj.stdout = stdout
Expand Down

0 comments on commit dc7b8e7

Please sign in to comment.