From ffe07f8851db19d3f77d59a7a4061f868f501ce4 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Mon, 15 Jun 2020 11:59:58 +0100 Subject: [PATCH 1/3] CI testing for s3 reads from public buckets on 1.0.x - DO NOT MERGE --- pandas/tests/io/test_s3.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pandas/tests/io/test_s3.py b/pandas/tests/io/test_s3.py index 04c6979596eca..4e6c5da932409 100644 --- a/pandas/tests/io/test_s3.py +++ b/pandas/tests/io/test_s3.py @@ -2,6 +2,8 @@ import pytest +import pandas.util._test_decorators as td + from pandas import read_csv from pandas.io.common import is_s3_url @@ -23,3 +25,10 @@ def test_streaming_s3_objects(): for el in data: body = StreamingBody(BytesIO(el), content_length=len(el)) read_csv(body) + + +@td.skip_if_no("s3fs") +def test_read_csv_from_public_bucket(): + # https://github.com/pandas-dev/pandas/issues/34626 + result = read_csv("s3://nyc-tlc/misc/taxi _zone_lookup.csv") + assert result.shape == (265, 4) From c7be2cd694ab8efe5910da8c64da5a7397e4c213 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Mon, 15 Jun 2020 15:19:37 +0100 Subject: [PATCH 2/3] failing test --- pandas/tests/io/test_s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/io/test_s3.py b/pandas/tests/io/test_s3.py index 4e6c5da932409..fb7b659f060a4 100644 --- a/pandas/tests/io/test_s3.py +++ b/pandas/tests/io/test_s3.py @@ -31,4 +31,4 @@ def test_streaming_s3_objects(): def test_read_csv_from_public_bucket(): # https://github.com/pandas-dev/pandas/issues/34626 result = read_csv("s3://nyc-tlc/misc/taxi _zone_lookup.csv") - assert result.shape == (265, 4) + assert result.shape == (265, 42) From b09de22d81073a69740c172501b5b62f8406bec5 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Mon, 15 Jun 2020 16:17:29 +0100 Subject: [PATCH 3/3] Revert "failing test" This reverts commit c7be2cd694ab8efe5910da8c64da5a7397e4c213. --- pandas/tests/io/test_s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/io/test_s3.py b/pandas/tests/io/test_s3.py index fb7b659f060a4..4e6c5da932409 100644 --- a/pandas/tests/io/test_s3.py +++ b/pandas/tests/io/test_s3.py @@ -31,4 +31,4 @@ def test_streaming_s3_objects(): def test_read_csv_from_public_bucket(): # https://github.com/pandas-dev/pandas/issues/34626 result = read_csv("s3://nyc-tlc/misc/taxi _zone_lookup.csv") - assert result.shape == (265, 42) + assert result.shape == (265, 4)