Skip to content

Update test convention docs to reflect class discovery for parameterized tests#57

Closed
Copilot wants to merge 10 commits intobug/AP-25573-pandas-2-3-supportfrom
copilot/sub-pr-56
Closed

Update test convention docs to reflect class discovery for parameterized tests#57
Copilot wants to merge 10 commits intobug/AP-25573-pandas-2-3-supportfrom
copilot/sub-pr-56

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

The repository convention documented in .github/instructions/python.instructions.md incorrectly stated that pytest.ini disables class discovery. In reality, pytest.ini enables class discovery (python_classes = Test* *Test) to support parameterized pytest tests.

Changes

  • Updated .github/instructions/python.instructions.md test style convention from "Function-based tests only (pytest.ini disables class discovery)" to "Primarily function-based tests. Class-based tests (Test* and *Test patterns) are enabled in pytest.ini to support parameterized tests."

This aligns the documentation with the actual pytest configuration and clarifies that while function-based tests remain the primary style, class-based patterns are enabled for parameterized test support.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

HedgehogCode and others added 9 commits February 3, 2026 15:28
…mpty arrays

The usual case works for empty arrays and handles dtypes of extension arrays correctly.

AP-25573 (Workflow tests fail with pandas 2.3)
… of int/bool

AP-25573 (Workflow tests fail with pandas 2.3)
Otherwise, if the chunked array has no chunks and we attempt to concatenate
no arrays, which fails.

AP-25573 (Workflow tests fail with pandas 2.3)
…are taken

Bug: In pandas 2.1.0+, pd.concat changed its behavior and now calls
KnimePandasExtensionArray.take with indices [0,1,2,...,n] to effectively copy the
array. When take is called on struct dict encoded arrays, it delegates to
storage.take(), which merges chunks of the ChunkedArray without recalculating the
struct-dict encoding. This breaks the dictionary structure across chunk boundaries:
keys in chunk 2 reference indices that only exist in chunk 1's data array, causing
"Cannot read DataCell with empty type information" errors.

Fix: Shortcut the specific case where all indices are taken sequentially by
returning a copy instead of calling storage.take(). This fixes the pd.concat
code path that triggers during arrow → pandas → arrow round-trips.

Limitation: This is only a partial fix for the very specific case of taking all
indices. The general take() and re-batching behavior for struct dict encoded arrays
remains buggy when partial indices are selected or arbitrary re-batching occurs.

AP-25573 (Workflow tests fail with pandas 2.3)
…ionArray.take

AP-25573 (Workflow tests fail with pandas 2.3)
…zed tests

Co-authored-by: HedgehogCode <6631116+HedgehogCode@users.noreply.github.com>
Copilot AI changed the title [WIP] Update pytest tests and conftest.py based on feedback Update test convention docs to reflect class discovery for parameterized tests Feb 5, 2026
Copilot AI requested a review from HedgehogCode February 5, 2026 09:22
@HedgehogCode HedgehogCode force-pushed the bug/AP-25573-pandas-2-3-support branch 2 times, most recently from 239a578 to 6f8f9dd Compare February 5, 2026 09:29
@HedgehogCode
Copy link
Contributor

Manually merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants