Skip to content

Commit

Permalink
test asset context instance check
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Sep 20, 2023
1 parent 73193be commit c9751d3
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,14 @@ def test_instance_check():
warnings.filterwarnings("error")

@asset
def test_instance_check(context: AssetExecutionContext):
def test_op_context_instance_check(context: AssetExecutionContext):
isinstance(context, OpExecutionContext)

with pytest.raises(DeprecationWarning):
materialize([test_instance_check])
materialize([test_op_context_instance_check])

@asset
def test_asset_context_instance_check(context: AssetExecutionContext):
isinstance(context, AssetExecutionContext)

materialize([test_asset_context_instance_check])

0 comments on commit c9751d3

Please sign in to comment.