()
| 1935 | |
| 1936 | @pytest.mark.s3 |
| 1937 | def test_s3_real_aws(): |
| 1938 | # Exercise connection code with an AWS-backed S3 bucket. |
| 1939 | # This is a minimal integration check for ARROW-9261 and similar issues. |
| 1940 | from pyarrow.fs import S3FileSystem |
| 1941 | default_region = (os.environ.get('PYARROW_TEST_S3_REGION') or |
| 1942 | 'us-east-1') |
| 1943 | fs = S3FileSystem(anonymous=True) |
| 1944 | assert fs.region == default_region |
| 1945 | |
| 1946 | fs = S3FileSystem(anonymous=True, region='us-east-1') |
| 1947 | entries = fs.get_file_info(FileSelector( |
| 1948 | 'arrow-datasets/nyc-taxi')) |
| 1949 | assert len(entries) > 0 |
| 1950 | key = 'arrow-datasets/nyc-taxi/year=2019/month=6/part-0.parquet' |
| 1951 | with fs.open_input_stream(key) as f: |
| 1952 | md = f.metadata() |
| 1953 | assert 'Content-Type' in md |
| 1954 | assert md['Last-Modified'] == b'2025-11-26T10:28:55Z' |
| 1955 | # For some reason, the header value is quoted |
| 1956 | # (both with AWS and Minio) |
| 1957 | assert md['ETag'] == b'"4c6a76826a695c6ac61592bc30cda3df-16"' |
| 1958 | |
| 1959 | |
| 1960 | @pytest.mark.s3 |
nothing calls this directly
no test coverage detected