Skip to content

Commit

Permalink
F841
Browse files Browse the repository at this point in the history
  • Loading branch information
markus-96 committed Jan 23, 2025
1 parent 2467dcc commit ef7f3ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/benchmarks/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async def _create():
@pytest.fixture
def create_decimals() -> None:
async def _create():
obj0 = await DecimalFields.create(decimal=Decimal("1.23456"), decimal_nodec=18.7)
obj = await DecimalFields.filter(decimal=Decimal("1.2346")).first()
await DecimalFields.create(decimal=Decimal("1.23456"), decimal_nodec=18.7)
await DecimalFields.filter(decimal=Decimal("1.2346")).first()

asyncio.get_event_loop().run_until_complete(_create())
8 changes: 2 additions & 6 deletions tests/benchmarks/test_annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_values_related_m2m(benchmark, create_team_with_participants):
@benchmark
def bench():
async def _bench():
tournament2 = await Event.filter(name="Test").values("name", "participants__name")
await Event.filter(name="Test").values("name", "participants__name")

loop.run_until_complete(_bench())

Expand All @@ -34,10 +34,6 @@ def test_filter_decimal(benchmark, create_decimals):
@benchmark
def bench():
async def _bench():
(
await DecimalFields.annotate(d=F("decimal"))
.filter(d=Decimal("1.2346"))
.first()
)
await DecimalFields.annotate(d=F("decimal")).filter(d=Decimal("1.2346")).first()

loop.run_until_complete(_bench())

0 comments on commit ef7f3ef

Please sign in to comment.