From 36f3a79494ef4b07baf23d0bb301811b20f42674 Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sun, 11 Feb 2018 09:42:40 -0500 Subject: [PATCH] TST: placement of network error catching in s3 tests --- pandas/tests/io/json/test_pandas.py | 1 + pandas/tests/io/parser/test_network.py | 3 ++- pandas/tests/io/test_parquet.py | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pandas/tests/io/json/test_pandas.py b/pandas/tests/io/json/test_pandas.py index 10139eb07a925b..8f507e7d3725d2 100644 --- a/pandas/tests/io/json/test_pandas.py +++ b/pandas/tests/io/json/test_pandas.py @@ -1038,6 +1038,7 @@ def test_read_inline_jsonl(self): expected = DataFrame([[1, 2], [1, 2]], columns=['a', 'b']) assert_frame_equal(result, expected) + @tm.network def test_read_s3_jsonl(self, s3_resource): pytest.importorskip('s3fs') # GH17200 diff --git a/pandas/tests/io/parser/test_network.py b/pandas/tests/io/parser/test_network.py index 10f6cef04b593b..fd924a430925c4 100644 --- a/pandas/tests/io/parser/test_network.py +++ b/pandas/tests/io/parser/test_network.py @@ -45,8 +45,9 @@ def check_compressed_urls(salaries_table, compression, extension, mode, tm.assert_frame_equal(url_table, salaries_table) +@tm.network class TestS3(object): - @tm.network + def test_parse_public_s3_bucket(self): pytest.importorskip('s3fs') # more of an integration test due to the not-public contents portion diff --git a/pandas/tests/io/test_parquet.py b/pandas/tests/io/test_parquet.py index 11cbea8ce63314..2f8e6dbd5d2baa 100644 --- a/pandas/tests/io/test_parquet.py +++ b/pandas/tests/io/test_parquet.py @@ -432,6 +432,7 @@ def test_categorical_unsupported(self, pa_lt_070): df = pd.DataFrame({'a': pd.Categorical(list('abc'))}) self.check_error_on_write(df, pa, NotImplementedError) + @tm.network def test_s3_roundtrip(self, df_compat, s3_resource, pa): # GH #19134 check_round_trip(df_compat, pa, @@ -498,6 +499,7 @@ def test_filter_row_groups(self, fp): result = read_parquet(path, fp, filters=[('a', '==', 0)]) assert len(result) == 1 + @tm.network def test_s3_roundtrip(self, df_compat, s3_resource, fp): # GH #19134 check_round_trip(df_compat, fp,