Skip to content

Commit e1f34dc

Browse files
committed
AP-21518: Add test that fails with the latest Pandas
AP-21518 (Add support for Python 3.12 and 3.13)
1 parent ed6e7b1 commit e1f34dc

File tree

1 file changed

+14
-0
lines changed
  • org.knime.python3.arrow.tests/src/test/python/unittest

1 file changed

+14
-0
lines changed

org.knime.python3.arrow.tests/src/test/python/unittest/test_table.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,20 @@ def test_to_from_pandas(self):
307307
with self.assertRaises(RuntimeError):
308308
self.generate_test_table_with_rowid_column().to_pandas()
309309

310+
def test_pandas_roundtrip_with_data(self):
311+
"""
312+
This test works up to Py 3.11 and Pandas <2, but fails with
313+
Py 3.12 and Pandas 2.1
314+
"""
315+
table = self._test_table
316+
data = table.to_pandas()
317+
# if we omit the 2 columns below, the roundtrip works also in Py3.12
318+
# data.drop(["TimestampCol", "URICol"], axis=1, inplace=True)
319+
other = kt.Table.from_pandas(data)
320+
data2 = other.to_pandas()
321+
322+
pd.testing.assert_frame_equal(data, data2)
323+
310324
def test_to_batches(self):
311325
table = self._test_table
312326
batches = list(table.to_batches())

0 commit comments

Comments
 (0)