Skip to content

Commit

Permalink
py3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Sep 26, 2024
1 parent df0efb2 commit d29159b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fakeredis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
else:

class TcpFakeServer:
pass
def __init__(self, *args, **kwargs):
raise NotImplementedError("TcpFakeServer is only available in Python 3.11+")


try:
Expand Down
5 changes: 5 additions & 0 deletions test/test_tcp_server/test_connectivity.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import sys
import time
from threading import Thread

import pytest
import redis

from fakeredis import TcpFakeServer

if sys.version_info < (3, 11):
pytest.skip("TcpFakeServer is only available in Python 3.11+", allow_module_level=True)


def test_tcp_server_started():
server_address = ("127.0.0.1", 19000)
Expand Down

0 comments on commit d29159b

Please sign in to comment.