Skip to content

Commit

Permalink
feat: remove pytest integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
klen committed Aug 2, 2023
1 parent c045f5b commit e10bd6c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ Name Default value Description
**blocking** ``True`` Wait for an available connection
**timeout** ``20`` Timeout to get a connection
**redislite** ``False`` Use redislite instead of redis
**pytest** ``True`` Pytest integration: flush redis before each test
=========================== ======================================= ===========================

.. _bugtracker:
Expand Down
9 changes: 1 addition & 8 deletions muffin_redis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from contextlib import asynccontextmanager, suppress
from contextlib import suppress
from typing import TYPE_CHECKING, Any, ClassVar, Dict, Optional

from asgi_tools._compat import json_dumps, json_loads
Expand Down Expand Up @@ -30,7 +30,6 @@ class Plugin(BasePlugin):
"timeout": 20,
# ===
"redislite": False,
"pytest": True,
}

Error = RedisError
Expand Down Expand Up @@ -120,9 +119,3 @@ async def get(self, key, *, jsonify: Optional[bool] = None, **options):
return json_loads(value)

return value

@asynccontextmanager
async def conftest(self):
"""Flush redis between tests."""
await self.client.flushall()
yield

0 comments on commit e10bd6c

Please sign in to comment.