Skip to content

Test _shape=arrays and _shape=arrayfirst for rows containing infinity - #3073

Merged
simonw merged 1 commit into
mainfrom
shape-arrays-infinity
Nov 15, 2026
Merged

simonw merged 1 commit into
mainfrom
shape-arrays-infinity

Conversation

@simonw

@simonw simonw commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Regression tests only. There is no code change, because the bug #2986 set out to fix is already fixed on main.

Claude Fable 5.2 Medium

Background

remove_infinites() returns a plain list for a sqlite3.Row that contains infinity. json_renderer() used to assert that every row was a sqlite3.Row or a dict, so ?_shape=arrays and ?_shape=arrayfirst returned a 500 for those rows.

030d482 (#3005) rewrote those two branches to treat anything that is not a dict as a sequence. That fixed the 500 as a side effect, but nothing tests it.

What this adds

test_infinity_with_array_shapes in tests/test_table_api.py, covering both shapes on:

  • an arbitrary SQL query against the infinity fixture table
  • the table page
  • a row page

All six cases pass on current main.

This is the last piece of #2986 that was not already on main or in #3071, so #2986 can be closed.

🤖 Generated with Claude Code

remove_infinites() returns a plain list for a sqlite3.Row that contains
infinity. json_renderer() used to assert that every row was a
sqlite3.Row or a dict, so those two shapes returned a 500 for such rows.

030d482 (#3005) changed those branches to treat anything that is not a
dict as a sequence, which fixed this as a side effect but added no test
for it. These tests cover query, table and row pages.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@simonw
simonw merged commit b41c5fc into main Nov 15, 2026
13 checks passed
@simonw
simonw deleted the shape-arrays-infinity branch November 15, 2026 21:58
@codecov

codecov Bot commented Nov 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (fc67ea9) to head (4401b76).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3073   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         80      80           
  Lines      14000   14000           
=====================================
  Misses     14000   14000           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant