Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Commit

Permalink
tests: skip append parquet tests if fastparquet is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
trgiangdo committed Nov 13, 2023
1 parent 5812d79 commit 2682eb4
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests/core/data/test_parquet_data_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ def test_get_system_folder_modified_date_instead_of_last_edit_date(self, tmpdir_

os.unlink(temp_file_path)

@pytest.mark.skipif(not util.find_spec("fastparquet"), reason="Append parquet requires fastparquet to be installed")
@pytest.mark.parametrize(
"content",
[
Expand All @@ -308,10 +309,6 @@ def test_get_system_folder_modified_date_instead_of_last_edit_date(self, tmpdir_
],
)
def test_append_pandas(self, parquet_file_path, default_data_frame, content):
# !!! append data only works with `fastparquet`
if not util.find_spec("fastparquet"):
pass

dn = ParquetDataNode("foo", Scope.SCENARIO, properties={"path": parquet_file_path})
assert_frame_equal(dn.read(), default_data_frame)

Expand All @@ -321,6 +318,7 @@ def test_append_pandas(self, parquet_file_path, default_data_frame, content):
pd.concat([default_data_frame, pd.DataFrame(content, columns=["a", "b", "c"])]).reset_index(drop=True),
)

@pytest.mark.skipif(not util.find_spec("fastparquet"), reason="Append parquet requires fastparquet to be installed")
@pytest.mark.parametrize(
"content",
[
Expand All @@ -329,10 +327,6 @@ def test_append_pandas(self, parquet_file_path, default_data_frame, content):
],
)
def test_append_modin(self, parquet_file_path, default_data_frame, content):
# !!! append data only works with `fastparquet`
if not util.find_spec("fastparquet"):
pass

dn = ParquetDataNode("foo", Scope.SCENARIO, properties={"path": parquet_file_path, "exposed_type": "modin"})
df_equals(dn.read(), modin_pd.DataFrame(default_data_frame))

Expand Down

0 comments on commit 2682eb4

Please sign in to comment.