Skip to content

Commit fbc218e

Browse files
committed
Adding test for sequential overwrites
1 parent 0e34581 commit fbc218e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

testing/test_awswrangler/test_pandas.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,3 +2513,26 @@ def test_read_fwf_prefix(bucket):
25132513
wr.s3.delete_objects(path=path)
25142514
print(dataframe)
25152515
assert len(dataframe.index) == 10
2516+
2517+
2518+
def test_sequential_overwrite(bucket):
2519+
path = f"s3://{bucket}/test_sequential_overwrite/"
2520+
df = pd.DataFrame({"col": [1]})
2521+
df2 = pd.DataFrame({"col": [2]})
2522+
wr.pandas.to_parquet(
2523+
dataframe=df,
2524+
path=path,
2525+
preserve_index=False,
2526+
mode="overwrite",
2527+
procs_cpu_bound=1
2528+
)
2529+
wr.pandas.to_parquet(
2530+
dataframe=df2,
2531+
path=path,
2532+
preserve_index=False,
2533+
mode="overwrite",
2534+
procs_cpu_bound=1
2535+
)
2536+
df3 = wr.pandas.read_parquet(path=path)
2537+
assert len(df3.index) == 1
2538+
assert df3.col[0] == 2

0 commit comments

Comments
 (0)