Skip to content

Build the pandas result-set tests through the constructor #1257

Closed

Description

@laughingman7743

Summary

Part of #1239. After #1256, tests/pyathena/pandas/test_result_set.py builds AthenaPandasResultSet in two ways:

The second kind tests a result set that __init__ never builds. A change to the constructor's state, such as a new attribute that the reads use, can pass these tests and fail for callers. Two helpers also give future tests a choice of fakes; #1256's reviews asked to keep a single kind.

Proposal

Move the tests that use the bypass helpers onto _local_result_set(), mainly the json-column tests and test_iter_parquet_chunks_null_in_later_file, then delete the bypass helpers. Each moved test must still fail under its mutation. Some json tests read CSV text that is not quoted as Athena writes it; check that they read the same data through the constructor. _fetching_result_set() patches _create_dataframe_iterator to feed prepared chunks and can stay, because the fetch tests need chunk boundaries that a local file does not control.

Activity

  1. laughingman7743 commented on Oct 17, 2026

    @laughingman7743
    MemberAuthor

    From the review of #1256: no test checks that a cursor's block_size and cache_type reach PyAthena's S3FileSystem for the CSV result file (pyathena/pandas/result_set.py:869-870). The local filesystem of _local_result_set() ignores construction options, so a test of this needs PyAthena's real S3FileSystem over a stubbed S3 client, with nondefault settings.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions