Skip to content

Commit a0ab1d3

Browse files
authored
Merge pull request #363 from dkropachev/int_tests_on_3.13
Bring python 3.13 into integration tests
2 parents 347f332 + 58847ec commit a0ab1d3

File tree

5 files changed

+31
-19
lines changed

5 files changed

+31
-19
lines changed

.github/workflows/integration-tests.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,29 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
java-version: [8]
20-
python-version: ["3.8.17", "3.11.4", "3.12.0b4"]
20+
python-version: ["3.8", "3.11", "3.12", "3.13"]
2121
event_loop_manager: ["libev", "asyncio", "asyncore"]
2222
exclude:
23-
- python-version: "3.12.0b4"
23+
- python-version: "3.12"
24+
event_loop_manager: "asyncore"
25+
- python-version: "3.13"
2426
event_loop_manager: "asyncore"
2527

2628
steps:
27-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
2830

2931
- name: Set up JDK ${{ matrix.java-version }}
3032
uses: actions/setup-java@v4
3133
with:
3234
java-version: ${{ matrix.java-version }}
3335
distribution: 'adopt'
3436

35-
- name: setup pyenv ${{ matrix.python-version }}
36-
uses: "gabrielfalcao/pyenv-action@v16"
37+
- uses: actions/setup-python@v5
38+
name: Install Python ${{ matrix.python-version }}
3739
with:
38-
default: 2.7.14
39-
versions: ${{ matrix.python-version }}
40+
python-version: ${{ matrix.python-version }}
41+
allow-prereleases: true
42+
4043
- name: Test with pytest
4144
run: |
4245
export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }}

tests/integration/cqlengine/management/test_management.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def test_table_property_update(self):
254254

255255
table_options = management._get_table_metadata(ModelWithTableProperties).options
256256

257-
self.assertDictContainsSubset(ModelWithTableProperties.__options__, table_options)
257+
self.assertTrue(set(ModelWithTableProperties.__options__) <= set(table_options))
258258

259259
def test_bogus_option_update(self):
260260
sync_table(ModelWithTableProperties)

tests/integration/long/test_ipv6.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,25 @@
1616
from ccmlib import common
1717

1818
from cassandra.cluster import NoHostAvailable
19-
from cassandra.io.asyncorereactor import AsyncoreConnection
19+
20+
try:
21+
from cassandra.io.asyncorereactor import AsyncoreConnection
22+
except ImportError:
23+
AsyncoreConnection = None
2024

2125
from tests import is_monkey_patched
2226
from tests.integration import use_cluster, remove_cluster, TestCluster
2327

28+
try:
29+
from cassandra.io.libevreactor import LibevConnection
30+
except ImportError:
31+
LibevConnection = None
32+
33+
2434
if is_monkey_patched():
25-
LibevConnection = -1
26-
AsyncoreConnection = -1
27-
else:
28-
try:
29-
from cassandra.io.libevreactor import LibevConnection
30-
except ImportError:
31-
LibevConnection = None
35+
LibevConnection = None
36+
AsyncoreConnection = None
37+
3238

3339
import unittest
3440

@@ -102,7 +108,7 @@ def setUp(self):
102108
if os.name == "nt":
103109
raise unittest.SkipTest("IPv6 is currently not supported under Windows")
104110

105-
if LibevConnection == -1:
111+
if LibevConnection is None:
106112
raise unittest.SkipTest("Can't test libev with monkey patching")
107113
elif LibevConnection is None:
108114
raise unittest.SkipTest("Libev does not appear to be installed properly")
@@ -116,5 +122,5 @@ def setUp(self):
116122
if os.name == "nt":
117123
raise unittest.SkipTest("IPv6 is currently not supported under Windows")
118124

119-
if AsyncoreConnection == -1:
125+
if AsyncoreConnection is None:
120126
raise unittest.SkipTest("Can't test asyncore with monkey patching")

tests/integration/standard/test_connection.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,9 @@ class AsyncoreConnectionTests(ConnectionTests, unittest.TestCase):
446446
def setUp(self):
447447
if is_monkey_patched():
448448
raise unittest.SkipTest("Can't test asyncore with monkey patching")
449+
if AsyncoreConnection is None:
450+
raise unittest.SkipTest(
451+
'asyncore does not appear to be installed properly')
449452
ConnectionTests.setUp(self)
450453

451454
def clean_global_loop(self):

tests/integration/standard/test_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def test_bad_contact_point(self):
133133

134134
# verify the un-existing host was filtered
135135
for host in self.cluster.metadata.all_hosts():
136-
self.assertNotEquals(host.endpoint.address, '126.0.0.186')
136+
self.assertNotEqual(host.endpoint.address, '126.0.0.186')
137137

138138

139139
class SchemaMetadataTests(BasicSegregatedKeyspaceUnitTestCase):

0 commit comments

Comments
 (0)