Skip to content

Commit 3f62679

Browse files
committed
fixed failing tests for python3.12
1 parent e3b80bf commit 3f62679

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

requirements-tests.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ aiohttp == 3.10.0
22
anyio[trio] >= 3.2.1
33
argon2-cffi == 23.1.0
44
autoflake
5+
bcrypt; python_version >= '3.12'
56
email_validator >=1.1.1
67
itsdangerous >=1.1.0,<3.0.0
78
mypy == 1.11.1

tests/test_cache/pylib_mock.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import time
22

3-
try:
4-
from pylibmc import Client
5-
except ImportError:
6-
Client = type("pylibmc.Client", (), {})
3+
from pylibmc import Client
74

85

96
class MockClient(Client):

tests/test_cache/test_pylibmc_cache.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
import pytest
44

55
if sys.version_info >= (3, 12):
6-
pytest.skip(reason="This test requires Python 3.11 or lower")
6+
pytest.skip(
7+
reason="This test requires Python 3.11 or lower", allow_module_level=True
8+
)
79

810
from time import sleep
911
from unittest.mock import patch

0 commit comments

Comments
 (0)