MCPcopy
hub / github.com/ormar-orm/ormar / test_sum

Function test_sum

benchmarks/test_benchmark_aggregate.py:29–35  ·  view source on GitHub ↗
(aio_benchmark, num_models: int, authors_in_db: list[Author])

Source from the content-addressed store, hash-verified

27
28@pytest.mark.parametrize("num_models", [250, 500, 1000])
29async def test_sum(aio_benchmark, num_models: int, authors_in_db: list[Author]):
30 @aio_benchmark
31 async def sum_():
32 return await Author.objects.sum("score")
33
34 s = sum_()
35 assert 0 <= s <= 100 * num_models
36
37
38@pytest.mark.parametrize("num_models", [250, 500, 1000])

Callers

nothing calls this directly

Calls 1

sum_Function · 0.85

Tested by

no test coverage detected