From b6faaf65808ad7b61edf8c1f1caf08a366d9984f Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Sun, 27 Sep 2026 19:28:16 +0300 Subject: [PATCH] chore: give every coverage pragma a reason (TS6) --- tests/conftest.py | 2 +- tests/test_jobs.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 9928963..885b9b3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -16,7 +16,7 @@ async def arq_redis() -> typing.AsyncIterator[ArqRedis]: pool = await create_pool(settings) try: await pool.ping() - except Exception as exc: # noqa: BLE001 # pragma: no cover + except Exception as exc: # noqa: BLE001 # pragma: no cover - only when Redis is unreachable; the suite runs against one await pool.aclose() pytest.skip(f"Redis not available at {REDIS_URL}: {exc}") await pool.flushdb() diff --git a/tests/test_jobs.py b/tests/test_jobs.py index f1a5121..96d2012 100644 --- a/tests/test_jobs.py +++ b/tests/test_jobs.py @@ -282,7 +282,7 @@ async def bad_task( app_instance: typing.Annotated[AppResource, FromDI(AppResource)], # noqa: ARG001 *args: int, ) -> None: - results["never_called"] = args # pragma: no cover + results["never_called"] = args # pragma: no cover - never runs; inject rejects the signature first with pytest.raises(TypeError): inject(bad_task) @@ -294,7 +294,7 @@ async def bad_task( app_instance: typing.Annotated[AppResource, FromDI(AppResource)], # noqa: ARG001 **kwargs: int, ) -> None: - results["never_called"] = kwargs # pragma: no cover + results["never_called"] = kwargs # pragma: no cover - never runs; inject rejects the signature first with pytest.raises(TypeError): inject(bad_task)