MCPcopy Create free account
hub / github.com/apache/arrow / test_s3_real_aws

Function test_s3_real_aws

python/pyarrow/tests/test_fs.py:1937–1957  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1935
1936@pytest.mark.s3
1937def 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

Callers

nothing calls this directly

Calls 7

S3FileSystemClass · 0.85
lenFunction · 0.85
FileSelectorClass · 0.50
getMethod · 0.45
get_file_infoMethod · 0.45
open_input_streamMethod · 0.45
metadataMethod · 0.45

Tested by

no test coverage detected