Skip to content

Commit

Permalink
ci: Fix pandas.DeltaTableDataset tests (#811)
Browse files Browse the repository at this point in the history
Fix deltatable tests

Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
  • Loading branch information
ankatiyar authored Aug 21, 2024
1 parent e717fdb commit 994f86c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kedro-datasets/tests/pandas/test_deltatable_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_overwrite_with_diff_schema(self, deltatable_dataset_from_path, dummy_df
"""Test saving with the default overwrite mode with new data of diff schema."""
deltatable_dataset_from_path.save(dummy_df)
new_df = pd.DataFrame({"new_col": [1, 2]})
pattern = "Schema of data does not match table schema"
pattern = "Cannot cast schema, number of fields does not match: 1 vs 3"
with pytest.raises(DatasetError, match=pattern):
deltatable_dataset_from_path.save(new_df)

Expand Down Expand Up @@ -167,4 +167,4 @@ def test_history(self, deltatable_dataset_from_path, dummy_df):
deltatable_dataset_from_path.save(dummy_df)
history = deltatable_dataset_from_path.history
assert isinstance(history, list)
assert history[0]["operation"] == "CREATE TABLE"
assert history[0]["operation"] == "WRITE"

0 comments on commit 994f86c

Please sign in to comment.