Skip to content

Commit 452104e

Browse files
author
maxim veksler
committed
Move test_s3_roundtrip into TestParquetPyArrow and add pa fixture
1 parent 4011374 commit 452104e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pandas/tests/io/test_parquet.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,6 @@ def test_cross_engine_fp_pa(df_cross_compat, pa, fp):
203203
result = read_parquet(path, engine=pa, columns=['a', 'd'])
204204
tm.assert_frame_equal(result, df[['a', 'd']])
205205

206-
def test_s3_roundtrip(df_compat, s3_resource, engine):
207-
# GH #19134
208-
if engine == 'pyarrow':
209-
df_compat.to_parquet('s3://pandas-test/test.parquet',
210-
engine, compression=None)
211-
212-
expected = df_compat
213-
actual = pd.read_parquet('s3://pandas-test/test.parquet', engine)
214-
215-
tm.assert_frame_equal(expected, actual)
216206

217207
class Base(object):
218208

@@ -436,6 +426,16 @@ def test_categorical_unsupported(self, pa_lt_070):
436426
df = pd.DataFrame({'a': pd.Categorical(list('abc'))})
437427
self.check_error_on_write(df, pa, NotImplementedError)
438428

429+
def test_s3_roundtrip(self, df_compat, s3_resource, pa):
430+
# GH #19134
431+
df_compat.to_parquet('s3://pandas-test/test.parquet',
432+
engine=pa, compression=None)
433+
434+
expected = df_compat
435+
actual = read_parquet('s3://pandas-test/test.parquet', engine=pa)
436+
437+
tm.assert_frame_equal(expected, actual)
438+
439439

440440
class TestParquetFastParquet(Base):
441441

0 commit comments

Comments
 (0)