From bce8bf5f81859c59a068fcc1d6d8beff67563f75 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sat, 21 Nov 2020 20:19:47 +0100 Subject: [PATCH] make individual coverage checker happy --- mitmproxy/utils/asyncio_utils.py | 2 +- test/mitmproxy/utils/test_debug.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mitmproxy/utils/asyncio_utils.py b/mitmproxy/utils/asyncio_utils.py index b348c9780..2feaaaeed 100644 --- a/mitmproxy/utils/asyncio_utils.py +++ b/mitmproxy/utils/asyncio_utils.py @@ -11,7 +11,7 @@ def cancel_task(task: asyncio.Task, message: str) -> None: """Like task.cancel(), but optionally with a message if the Python version supports it.""" if sys.version_info >= (3, 9): task.cancel(message) # type: ignore - else: + else: # pragma: no cover task.cancel() diff --git a/test/mitmproxy/utils/test_debug.py b/test/mitmproxy/utils/test_debug.py index e89e99f7b..065574293 100644 --- a/test/mitmproxy/utils/test_debug.py +++ b/test/mitmproxy/utils/test_debug.py @@ -24,7 +24,7 @@ def test_dump_info(): async def test_dump_info_async(): cs = io.StringIO() debug.dump_info(None, None, file=cs, testing=True) - if sys.version_info >= (3,8): + if sys.version_info >= (3, 8): assert "Tasks" in cs.getvalue()