You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ab...@apache.org on 2026/05/01 16:46:29 UTC
(cassandra-python-driver) branch CASSPYTHON-18 created (now 58d2566a)
This is an automated email from the ASF dual-hosted git repository.
absurdfarce pushed a change to branch CASSPYTHON-18
in repository https://gitbox.apache.org/repos/asf/cassandra-python-driver.git
at 58d2566a Fix for test_row_factories.py
This branch includes the following new commits:
new 58d2566a Fix for test_row_factories.py
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org
(cassandra-python-driver) 01/01: Fix for test_row_factories.py
Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
absurdfarce pushed a commit to branch CASSPYTHON-18
in repository https://gitbox.apache.org/repos/asf/cassandra-python-driver.git
commit 58d2566a03b26797c40fa20f9d53502ed4e0eeab
Author: absurdfarce <br...@ibm.com>
AuthorDate: Fri May 1 11:45:19 2026 -0500
Fix for test_row_factories.py
---
tests/unit/test_row_factories.py | 38 ++++++--------------------------------
1 file changed, 6 insertions(+), 32 deletions(-)
diff --git a/tests/unit/test_row_factories.py b/tests/unit/test_row_factories.py
index f91bdf31..899fa9a0 100644
--- a/tests/unit/test_row_factories.py
+++ b/tests/unit/test_row_factories.py
@@ -24,13 +24,8 @@ import sys
from unittest import TestCase
-
log = logging.getLogger(__name__)
-
-NAMEDTUPLE_CREATION_BUG = sys.version_info >= (3,) and sys.version_info < (3, 7)
-
-
class TestNamedTupleFactory(TestCase):
long_colnames, long_rows = (
@@ -50,37 +45,16 @@ class TestNamedTupleFactory(TestCase):
def test_creation_warning_on_long_column_list(self):
"""
- Reproduces the failure described in PYTHON-893
-
- @since 3.15
- @jira_ticket PYTHON-893
- @expected_result creation fails on Python > 3 and < 3.7
-
- @test_category row_factory
+ Test for a regression in PYTHON-893. Shouldn't be an issue with currently
+ supported versions since the underlying issue was fixed in Python 3.7
"""
- if not NAMEDTUPLE_CREATION_BUG:
- named_tuple_factory(self.long_colnames, self.long_rows)
- return
-
- with warnings.catch_warnings(record=True) as w:
- rows = named_tuple_factory(self.long_colnames, self.long_rows)
- self.assertEqual(len(w), 1)
- warning = w[0]
- self.assertIn('pseudo_namedtuple_factory', str(warning))
- self.assertIn('3.7', str(warning))
-
- for r in rows:
- self.assertEqual(r.col0, self.long_rows[0][0])
+ named_tuple_factory(self.long_colnames, self.long_rows)
def test_creation_no_warning_on_short_column_list(self):
"""
- Tests that normal namedtuple row creation still works after PYTHON-893 fix
-
- @since 3.15
- @jira_ticket PYTHON-893
- @expected_result creates namedtuple-based Rows
-
- @test_category row_factory
+ Tests that normal namedtuple row creation still works after PYTHON-893 fix.
+ Shouldn't be an issue with currently supported versions since the underlying
+ issue was fixed in Python 3.7
"""
with warnings.catch_warnings(record=True) as w:
rows = named_tuple_factory(self.short_colnames, self.short_rows)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org