Skip to content

Commit afd0356

Browse files
committed
chore(cassandra): skip test in Python 3.14 while there is no available driver
1 parent 2c288b9 commit afd0356

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

modules/cassandra/tests/test_cassandra.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
from cassandra.cluster import Cluster, DCAwareRoundRobinPolicy
2-
31
from testcontainers.cassandra import CassandraContainer
2+
import sys
3+
4+
from importlib.metadata import version
5+
import pytest
6+
from packaging.version import Version
7+
48

9+
@pytest.mark.skipif(
10+
Version(version("cassandra-driver")) <= Version("3.29.3") and sys.version_info > (3, 14),
11+
reason="cassandra-driver <= 3.29.3 is incompatible with Python > 3.14",
12+
)
13+
def test_docker_run_cassandra() -> None:
14+
from cassandra.cluster import Cluster, DCAwareRoundRobinPolicy
515

6-
def test_docker_run_cassandra():
716
with CassandraContainer("cassandra:4.1.4") as cassandra:
817
cluster = Cluster(
918
cassandra.get_contact_points(),

0 commit comments

Comments
 (0)