Skip to content

Commit

Permalink
preen, no requirement to be made in loop currently
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Nov 17, 2024
1 parent 4c1a2fd commit 2b7baca
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions tests/test_benchmarks_web_response.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
"""codspeed benchmarks for the web responses."""

import asyncio

from pytest_codspeed import BenchmarkFixture

from aiohttp import web


def test_simple_web_response(
loop: asyncio.AbstractEventLoop,
benchmark: BenchmarkFixture,
) -> None:
def test_simple_web_response(benchmark: BenchmarkFixture) -> None:
"""Benchmark creating 100 simple web.Response."""
response_count = 100

Expand All @@ -20,10 +15,7 @@ def _run() -> None:
web.Response()


def test_web_response_with_headers(
loop: asyncio.AbstractEventLoop,
benchmark: BenchmarkFixture,
) -> None:
def test_web_response_with_headers(benchmark: BenchmarkFixture) -> None:
"""Benchmark creating 100 web.Response with headers."""
response_count = 100
headers = {
Expand All @@ -39,7 +31,6 @@ def _run() -> None:


def test_web_response_with_bytes_body(
loop: asyncio.AbstractEventLoop,
benchmark: BenchmarkFixture,
) -> None:
"""Benchmark creating 100 web.Response with bytes."""
Expand All @@ -51,10 +42,7 @@ def _run() -> None:
web.Response(body=b"Hello, World!")


def test_web_response_with_text_body(
loop: asyncio.AbstractEventLoop,
benchmark: BenchmarkFixture,
) -> None:
def test_web_response_with_text_body(benchmark: BenchmarkFixture) -> None:
"""Benchmark creating 100 web.Response with text."""
response_count = 100

Expand All @@ -64,10 +52,7 @@ def _run() -> None:
web.Response(text="Hello, World!")


def test_simple_web_stream_response(
loop: asyncio.AbstractEventLoop,
benchmark: BenchmarkFixture,
) -> None:
def test_simple_web_stream_response(benchmark: BenchmarkFixture) -> None:
"""Benchmark creating 100 simple web.StreamResponse."""
response_count = 100

Expand Down

0 comments on commit 2b7baca

Please sign in to comment.