Skip to content

Commit

Permalink
assert on different metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Jan 5, 2024
1 parent 35ab834 commit 41070f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@
store_asset_value("number_x", storage_root, value)

context.log.info(f"{context.asset_key}: {2} * {multiplier} = {value}")
context.report_asset_materialization(data_version=compute_data_version(value))
context.report_asset_materialization(
data_version=compute_data_version(value),
metadata={"is_even": value % 2 == 0},
)
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def number_x(
)
assert result.success
mats = result.asset_materializations_for_node(number_x.op.name)
assert mats[0].metadata["path"]
assert mats[0].metadata["is_even"] is True


@pytest.mark.integration
Expand Down Expand Up @@ -115,7 +115,7 @@ def number_x(
)
assert result.success
mats = result.asset_materializations_for_node(number_x.op.name)
assert mats[0].metadata["path"]
assert mats[0].metadata["is_even"] is True


_print_script = """
Expand Down

0 comments on commit 41070f0

Please sign in to comment.