Skip to content

Remove the AioPandasCursor tests that #1245 covers - #1265

Merged
laughingman7743 merged 1 commit into
masterfrom
test/1244-aio-pandas-rows
Oct 18, 2026
Merged

laughingman7743 merged 1 commit into
masterfrom
test/1244-aio-pandas-rows

Conversation

@laughingman7743

@laughingman7743 laughingman7743 commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

WHAT

Remove tests/pyathena/aio/pandas/test_cursor.py::TestAioPandasCursor::test_invalid_arraysize and ::test_cancel_initial, the two rows of #1244 that #1256 kept until #1245.

WHY

Part of #1239, carried over from #1244. #1258 (#1245) added the covers these rows waited for:

  • aio/test_common.py::TestWithAsyncFetch::test_cancel_without_query[AioPandasCursor] checks that cancel() before a query raises ProgrammingError, as test_cancel_initial did.
  • test_connection.py::TestConnection::test_cursor_arraysize_uncapped[AioPandasCursor] and ::test_cursor_arraysize_not_positive[AioPandasCursor] check an arraysize above 1000 and a non-positive one. The constructor sets arraysize through the same WithResultSet.arraysize setter (pyathena/result_set.py:1013, :1328) that test_invalid_arraysize assigned.

Both removed tests ran on a live aio_pandas_cursor fixture; the covers are offline.

TEST

Python 3.15.0. At the PR head, on fb22d08:

  • just format: no changes. just lint: passed.
  • Mutation checks, offline with --noconftest and placeholder settings; git diff -- pyathena/ was empty after each:
    • Capping the WithResultSet.arraysize setter at 1000 fails test_cursor_arraysize_uncapped[AioPandasCursor].
    • Accepting zero in that setter fails test_cursor_arraysize_not_positive[AioPandasCursor].
    • Removing the query ID check of WithAsyncFetch.cancel() (pyathena/aio/common.py:787-788) fails test_cancel_without_query[AioPandasCursor].

No live tests were run locally, because the change only removes live tests. CI after Ready, at d088952: Test run 39086182984 passed (test / run (3.15), lint); test-sqla and test-sqla-async were skipped by the changes path filter.

🤖 Generated with Claude Code

#1258 added aio/test_common.py::TestWithAsyncFetch::test_cancel_without_query
and kept AioPandasCursor in the uncapped and not-positive arraysize tests of
test_connection.py, which set arraysize through the same setter as the
removed tests.

Refs #1244

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
with pytest.raises(ProgrammingError):
await aio_pandas_cursor.cancel()

@pytest.mark.parametrize(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review of fb22d08a432f120a187d23a07e0e84652e7abc92..d0889525ee0a1dfff0cfc5a8a06054c7bead7607.

Round 1 (behavior and test quality): CLEAN. AioPandasCursor inherits arraysize from WithResultSet, whose constructor assigns through the setter (pyathena/result_set.py:1013), so the constructor-based covers reach the setter that test_invalid_arraysize assigned; capping it at 1000 or accepting zero fails the AioPandasCursor cases. cancel() is WithAsyncFetch.cancel(), shared by the aio cursors; removing its query ID check fails test_cancel_without_query[AioPandasCursor]. ProgrammingError and pytest stay in use; just lint passed.

Round 2 (claims and operation): CLEAN. The covers exist on fb22d08 with AioPandasCursor in UNCAPPED_CURSORS (tests/pyathena/test_connection.py:52) and _ALL_CURSOR_CLASSES (tests/pyathena/aio/test_common.py:23). The removed tests used the live aio_pandas_cursor fixture, so the change saves its connection setup; no local live run.

with pytest.raises(ProgrammingError):
await aio_pandas_cursor.cancel()

@pytest.mark.parametrize(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review (relayed): Codex CLI 0.163.0, model gpt-6-astra, ChatGPT login, codex exec -s read-only, session 01a14c93-e754-7441-92bb-230bd3e6689a. Static review of fb22d08a..d0889525 in a clean detached snapshot, with the diff and the test policy, and no PR text or author findings. Result: CLEAN.

Covered: the cursor sources, inheritance, constructor and factory paths, fixtures, and the remaining tests under tests/pyathena/. It found that the WithResultSet.arraysize setter (pyathena/result_set.py:1328) is also checked by pandas/test_cursor.py::TestPandasCursor::test_invalid_arraysize and by the offline connection tests with AioPandasCursor, and that test_cancel_without_query[AioPandasCursor] awaits the real cancel(), so replacing its ProgrammingError (pyathena/aio/common.py:788) fails it.

@laughingman7743
laughingman7743 marked this pull request as ready for review October 18, 2026 01:21
@laughingman7743
laughingman7743 merged commit 0b18cdb into master Oct 18, 2026
11 checks passed
@laughingman7743
laughingman7743 deleted the test/1244-aio-pandas-rows branch October 18, 2026 01:35
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