Skip to content

Commit d5ad529

Browse files
authored
Use empty redis db for tests (#751)
* Tests should only run on empty Redis databases * Minor ruff fixes * Minor cleanups
1 parent 628526e commit d5ad529

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tests/redis_config.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
from __future__ import annotations
22

3-
import os
3+
from collections.abc import Sequence
44
from dataclasses import dataclass
5-
from typing import Sequence
65

76
from redis import Redis
87
from redis.exceptions import RedisError
@@ -22,10 +21,6 @@ def _find_empty_databases(host: str, port: int, *, required: int) -> Sequence[in
2221
Raises RuntimeError if we cannot connect or if we cannot find the requested
2322
number of empty databases. Sentinel ports are intentionally not probed.
2423
"""
25-
# try:
26-
# redis = Redis(host=host, port=port, db=0)
27-
# except Exception as exc: # pragma: no cover - defensive guard
28-
# raise RuntimeError(f"Refusing to run tests: cannot connect to Redis at {host}:{port}") from exc
2924

3025
empty_databases: list[int] = []
3126

0 commit comments

Comments
 (0)