Skip to content

Commit

Permalink
Add use_threads parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
eliabrio committed Sep 5, 2024
1 parent ea75b41 commit b071f0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/unit/test_s3_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,8 @@ def test_read_from_access_point(access_point_path_path: str) -> None:
assert df_out.shape == (3, 3)


def test_save_dataframe_with_ms_units(path, glue_database, glue_table):
@pytest.mark.parametrize("use_threads", [True, False, 2])
def test_save_dataframe_with_ms_units(path, glue_database, glue_table, use_threads):
df = pd.DataFrame(
{
"c0": [
Expand All @@ -1052,6 +1053,7 @@ def test_save_dataframe_with_ms_units(path, glue_database, glue_table):
dataset=True,
database=glue_database,
table=glue_table,
use_threads=use_threads,
)

# Saving exactly the same data twice. This ensures that even if the athena table exists, the flow of using its metadata
Expand All @@ -1062,6 +1064,7 @@ def test_save_dataframe_with_ms_units(path, glue_database, glue_table):
dataset=True,
database=glue_database,
table=glue_table,
use_threads=use_threads,
)
df_out = wr.s3.read_parquet_table(table=glue_table, database=glue_database)
assert df_out.shape == (8, 1)

0 comments on commit b071f0b

Please sign in to comment.