Repository navigation
Remove the AioPandasCursor tests that #1245 covers - #1265
Conversation
#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( |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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.
WHAT
Remove
tests/pyathena/aio/pandas/test_cursor.py::TestAioPandasCursor::test_invalid_arraysizeand::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 thatcancel()before a query raisesProgrammingError, astest_cancel_initialdid.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 setsarraysizethrough the sameWithResultSet.arraysizesetter (pyathena/result_set.py:1013,:1328) thattest_invalid_arraysizeassigned.Both removed tests ran on a live
aio_pandas_cursorfixture; the covers are offline.TEST
Python 3.15.0. At the PR head, on fb22d08:
just format: no changes.just lint: passed.--noconftestand placeholder settings;git diff -- pyathena/was empty after each:WithResultSet.arraysizesetter at 1000 failstest_cursor_arraysize_uncapped[AioPandasCursor].test_cursor_arraysize_not_positive[AioPandasCursor].WithAsyncFetch.cancel()(pyathena/aio/common.py:787-788) failstest_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-sqlaandtest-sqla-asyncwere skipped by thechangespath filter.🤖 Generated with Claude Code