Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring python 3.13 into integration tests #363

Merged
merged 5 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,29 @@ jobs:
fail-fast: false
matrix:
java-version: [8]
python-version: ["3.8.17", "3.11.4", "3.12.0b4"]
python-version: ["3.8", "3.11", "3.12", "3.13"]
event_loop_manager: ["libev", "asyncio", "asyncore"]
exclude:
- python-version: "3.12.0b4"
- python-version: "3.12"
event_loop_manager: "asyncore"
- python-version: "3.13"
event_loop_manager: "asyncore"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'adopt'

- name: setup pyenv ${{ matrix.python-version }}
uses: "gabrielfalcao/pyenv-action@v16"
- uses: actions/setup-python@v5
name: Install Python ${{ matrix.python-version }}
with:
default: 2.7.14
versions: ${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Test with pytest
run: |
export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/cqlengine/management/test_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def test_table_property_update(self):

table_options = management._get_table_metadata(ModelWithTableProperties).options

self.assertDictContainsSubset(ModelWithTableProperties.__options__, table_options)
self.assertTrue(set(ModelWithTableProperties.__options__) <= set(table_options))

def test_bogus_option_update(self):
sync_table(ModelWithTableProperties)
dkropachev marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
26 changes: 16 additions & 10 deletions tests/integration/long/test_ipv6.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,25 @@
from ccmlib import common

from cassandra.cluster import NoHostAvailable
from cassandra.io.asyncorereactor import AsyncoreConnection

try:
from cassandra.io.asyncorereactor import AsyncoreConnection
except ImportError:
AsyncoreConnection = None

from tests import is_monkey_patched
from tests.integration import use_cluster, remove_cluster, TestCluster

try:
from cassandra.io.libevreactor import LibevConnection
except ImportError:
LibevConnection = None


if is_monkey_patched():
LibevConnection = -1
AsyncoreConnection = -1
else:
try:
from cassandra.io.libevreactor import LibevConnection
except ImportError:
LibevConnection = None
LibevConnection = None
AsyncoreConnection = None


import unittest

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

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

if AsyncoreConnection == -1:
if AsyncoreConnection is None:
raise unittest.SkipTest("Can't test asyncore with monkey patching")
3 changes: 3 additions & 0 deletions tests/integration/standard/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,9 @@ class AsyncoreConnectionTests(ConnectionTests, unittest.TestCase):
def setUp(self):
if is_monkey_patched():
raise unittest.SkipTest("Can't test asyncore with monkey patching")
if AsyncoreConnection is None:
raise unittest.SkipTest(
'asyncore does not appear to be installed properly')
ConnectionTests.setUp(self)

def clean_global_loop(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/standard/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def test_bad_contact_point(self):

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


class SchemaMetadataTests(BasicSegregatedKeyspaceUnitTestCase):
Expand Down
Loading