Skip to content

Commit aaa35e4

Browse files
committed
feedback: rewrite test
1 parent d341250 commit aaa35e4

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

pandas/tests/io/test_parquet.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,17 @@ def test_columns_dtypes_invalid(self, engine):
376376
]
377377
self.check_error_on_write(df, engine, ValueError)
378378

379-
def test_to_bytes_without_path_or_buf_provided(self):
379+
def test_to_bytes_without_path_or_buf_provided(self, df_full):
380380
# GH 37105
381-
df = pd.DataFrame()
382-
df.to_parquet()
381+
382+
buf = df_full.to_parquet()
383+
384+
with tm.ensure_clean() as path:
385+
with open(path, "wb") as f:
386+
f.write(buf)
387+
res = pd.read_parquet(path)
388+
389+
tm.assert_frame_equal(df_full, res)
383390

384391
@pytest.mark.parametrize("compression", [None, "gzip", "snappy", "brotli"])
385392
def test_compression(self, engine, compression):

0 commit comments

Comments
 (0)