/usr/local/lib64/python3.6/site-packages/pandas/tests/io
NameSizeModeActions
excel/-0755rm
formats/-0755rm
json/-0755rm
parser/-0755rm
pytables/-0755rm
sas/-0755rm
__pycache__/-0755rm
conftest.py25260644editdlrm
generate_legacy_storage_files.py100740644editdlrm
test_clipboard.py80280644editdlrm
test_common.py134540644editdlrm
test_compression.py63320644editdlrm
test_date_converters.py12000644editdlrm
test_feather.py62060644editdlrm
test_fsspec.py31650644editdlrm
test_gbq.py68100644editdlrm
test_gcs.py29850644editdlrm
test_html.py392220644editdlrm
test_orc.py64820644editdlrm
test_parquet.py282210644editdlrm
test_pickle.py144400644editdlrm
test_s3.py15350644editdlrm
test_spss.py27450644editdlrm
test_sql.py1006600644editdlrm
test_stata.py782570644editdlrm
__init__.py00644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/pandas/tests/io/test_s3.py (1535B)
from io import BytesIO import os import pytest import pandas.util._test_decorators as td from pandas import read_csv import pandas._testing as tm def test_streaming_s3_objects(): # GH17135 # botocore gained iteration support in 1.10.47, can now be used in read_* pytest.importorskip("botocore", minversion="1.10.47") from botocore.response import StreamingBody data = [b"foo,bar,baz\n1,2,3\n4,5,6\n", b"just,the,header\n"] for el in data: body = StreamingBody(BytesIO(el), content_length=len(el)) read_csv(body) @tm.network @td.skip_if_no("s3fs") def test_read_without_creds_from_pub_bucket(): # GH 34626 # Use Amazon Open Data Registry - https://registry.opendata.aws/gdelt result = read_csv("s3://gdelt-open-data/events/1981.csv", nrows=3) assert len(result) == 3 @tm.network @td.skip_if_no("s3fs") def test_read_with_creds_from_pub_bucke(): # Ensure we can read from a public bucket with credentials # GH 34626 # Use Amazon Open Data Registry - https://registry.opendata.aws/gdelt with tm.ensure_safe_environment_variables(): # temporary workaround as moto fails for botocore >= 1.11 otherwise, # see https://github.com/spulec/moto/issues/1924 & 1952 os.environ.setdefault("AWS_ACCESS_KEY_ID", "foobar_key") os.environ.setdefault("AWS_SECRET_ACCESS_KEY", "foobar_secret") df = read_csv( "s3://gdelt-open-data/events/1981.csv", nrows=5, sep="\t", header=None, ) assert len(df) == 5