Skip to content

Commit

Permalink
Fix everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex committed Mar 30, 2024
1 parent 722cfb0 commit d793898
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ addopts = ["--strict-config", "--strict-markers"]
filterwarnings = ["error"]

[tool.coverage.run]
source_pkgs = ["uvicorn_worker", "tests"]
source = ["uvicorn_worker", "tests"]
parallel = true

[tool.coverage.report]
Expand Down
6 changes: 3 additions & 3 deletions tests/test_workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import pytest
from gunicorn.arbiter import Arbiter

import uvicorn_worker._workers
from uvicorn_worker import UvicornH11Worker, UvicornWorker

if TYPE_CHECKING:
from uvicorn._types import ASGIReceiveCallable, ASGISendCallable, LifespanStartupFailedEvent, Scope
Expand All @@ -26,14 +26,14 @@ def read_output(self) -> str:
return self.output.read().decode()


@pytest.fixture(params=(uvicorn_worker._workers.UvicornWorker, uvicorn_worker._workers.UvicornH11Worker))
@pytest.fixture(params=(UvicornWorker, UvicornH11Worker))
def worker_class(request: pytest.FixtureRequest) -> str:
"""Gunicorn worker class names to test."""
worker_class = request.param
return f"{worker_class.__module__}.{worker_class.__name__}"


async def app(scope: Scope, receive: ASGIReceiveCallable, send: ASGISendCallable) -> None:
async def app(scope: Scope, receive: ASGIReceiveCallable, send: ASGISendCallable) -> None: # pragma: no cover
assert scope["type"] == "http"
await send({"type": "http.response.start", "status": 204, "headers": []})
await send({"type": "http.response.body", "body": b"", "more_body": False})
Expand Down
2 changes: 1 addition & 1 deletion uvicorn_worker/_workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ async def _serve(self) -> None:
def run(self) -> None:
return asyncio.run(self._serve())

async def callback_notify(self) -> None:
async def callback_notify(self) -> None: # pragma: no cover
self.notify()


Expand Down

0 comments on commit d793898

Please sign in to comment.