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 19, 2023
1 parent a89fee0 commit 945482e
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 945482e

Please sign in to comment.