Skip to content

Commit

Permalink
small tests change
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-rp committed Sep 4, 2023
1 parent b36a74f commit 4f575fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion dlt/pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ def extract(
storage.commit_extract_files(extract_id)
return ExtractInfo(describe_extract_data(data))
except Exception as exc:
raise exc
# TODO: provide metrics from extractor
raise PipelineStepFailed(self, "extract", exc, ExtractInfo(describe_extract_data(data))) from exc

Expand Down
9 changes: 9 additions & 0 deletions tests/load/test_freeze_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ def test_freeze_new_tables(evolution_setting: str) -> None:
table_counts = load_table_counts(pipeline, *[t["name"] for t in pipeline.default_schema.data_tables()])
assert table_counts["items"] == 10
assert OLD_COLUMN_NAME in pipeline.default_schema.tables["items"]["columns"]
assert pipeline.default_schema.tables["items"]["schema_evolution_settings"] == {
"table": evolution_setting
}

pipeline.run([items_with_new_column(full_settings)])
table_counts = load_table_counts(pipeline, *[t["name"] for t in pipeline.default_schema.data_tables()])
Expand Down Expand Up @@ -148,6 +151,9 @@ def test_freeze_new_columns(evolution_setting: str) -> None:
table_counts = load_table_counts(pipeline, *[t["name"] for t in pipeline.default_schema.data_tables()])
assert table_counts["items"] == 10
assert OLD_COLUMN_NAME in pipeline.default_schema.tables["items"]["columns"]
assert pipeline.default_schema.tables["items"]["schema_evolution_settings"] == {
"column": evolution_setting
}

# subtable should work
pipeline.run([items_with_subtable(full_settings)])
Expand Down Expand Up @@ -204,6 +210,9 @@ def test_freeze_variants(evolution_setting: str) -> None:
table_counts = load_table_counts(pipeline, *[t["name"] for t in pipeline.default_schema.data_tables()])
assert table_counts["items"] == 10
assert OLD_COLUMN_NAME in pipeline.default_schema.tables["items"]["columns"]
assert pipeline.default_schema.tables["items"]["schema_evolution_settings"] == {
"column_variant": evolution_setting
}

# subtable should work
pipeline.run([items_with_subtable(full_settings)])
Expand Down

0 comments on commit 4f575fd

Please sign in to comment.