Skip to content

Commit

Permalink
CI: Mark s3 tests as single
Browse files Browse the repository at this point in the history
Closes pandas-dev#35856

I think we need to update the pytest pattern though, so this should
fail.
  • Loading branch information
TomAugspurger committed Aug 25, 2020
1 parent 2f15d1c commit e6ab6cb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions pandas/tests/io/excel/test_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@ def test_read_from_http_url(self, read_ext):
tm.assert_frame_equal(url_table, local_table)

@td.skip_if_not_us_locale
@pytest.mark.single
def test_read_from_s3_url(self, read_ext, s3_resource, s3so):
# Bucket "pandas-test" created in tests/io/conftest.py
with open("test1" + read_ext, "rb") as f:
Expand Down
2 changes: 2 additions & 0 deletions pandas/tests/io/json/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,7 @@ def test_read_inline_jsonl(self):
tm.assert_frame_equal(result, expected)

@td.skip_if_not_us_locale
@pytest.mark.single
def test_read_s3_jsonl(self, s3_resource, s3so):
# GH17200

Expand Down Expand Up @@ -1702,6 +1703,7 @@ def test_json_multiindex(self, dataframe, expected):
result = series.to_json(orient="index")
assert result == expected

@pytest.mark.single
def test_to_s3(self, s3_resource):
import time

Expand Down
1 change: 1 addition & 0 deletions pandas/tests/io/parser/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def tips_df(datapath):

@pytest.mark.usefixtures("s3_resource")
@td.skip_if_not_us_locale()
@pytest.mark.single
class TestS3:
@td.skip_if_no("s3fs")
def test_parse_public_s3_bucket(self, tips_df, s3so):
Expand Down
3 changes: 3 additions & 0 deletions pandas/tests/io/test_fsspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def test_fastparquet_options(fsspectest):


@td.skip_if_no("s3fs")
@pytest.mark.single
def test_from_s3_csv(s3_resource, tips_file, s3so):
tm.assert_equal(
read_csv("s3://pandas-test/tips.csv", storage_options=s3so), read_csv(tips_file)
Expand All @@ -148,6 +149,7 @@ def test_from_s3_csv(s3_resource, tips_file, s3so):

@pytest.mark.parametrize("protocol", ["s3", "s3a", "s3n"])
@td.skip_if_no("s3fs")
@pytest.mark.single
def test_s3_protocols(s3_resource, tips_file, protocol, s3so):
tm.assert_equal(
read_csv("%s://pandas-test/tips.csv" % protocol, storage_options=s3so),
Expand All @@ -157,6 +159,7 @@ def test_s3_protocols(s3_resource, tips_file, protocol, s3so):

@td.skip_if_no("s3fs")
@td.skip_if_no("fastparquet")
@pytest.mark.single
def test_s3_parquet(s3_resource, s3so):
fn = "s3://pandas-test/test.parquet"
df1.to_parquet(
Expand Down
4 changes: 4 additions & 0 deletions pandas/tests/io/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ def test_categorical(self, pa):
expected = df.astype(object)
check_round_trip(df, pa, expected=expected)

@pytest.mark.single
def test_s3_roundtrip_explicit_fs(self, df_compat, s3_resource, pa, s3so):
s3fs = pytest.importorskip("s3fs")
if LooseVersion(pyarrow.__version__) <= LooseVersion("0.17.0"):
Expand All @@ -555,6 +556,7 @@ def test_s3_roundtrip_explicit_fs(self, df_compat, s3_resource, pa, s3so):
write_kwargs=kw,
)

@pytest.mark.single
def test_s3_roundtrip(self, df_compat, s3_resource, pa):
if LooseVersion(pyarrow.__version__) <= LooseVersion("0.17.0"):
pytest.skip()
Expand All @@ -563,6 +565,7 @@ def test_s3_roundtrip(self, df_compat, s3_resource, pa):

@td.skip_if_no("s3fs")
@pytest.mark.parametrize("partition_col", [["A"], []])
@pytest.mark.single
def test_s3_roundtrip_for_dir(self, df_compat, s3_resource, pa, partition_col):
# GH #26388
expected_df = df_compat.copy()
Expand Down Expand Up @@ -761,6 +764,7 @@ def test_filter_row_groups(self, fp):
result = read_parquet(path, fp, filters=[("a", "==", 0)])
assert len(result) == 1

@pytest.mark.single
def test_s3_roundtrip(self, df_compat, s3_resource, fp):
# GH #19134
check_round_trip(df_compat, fp, path="s3://pandas-test/fastparquet.parquet")
Expand Down

0 comments on commit e6ab6cb

Please sign in to comment.