From 146248ff0ca8376aa9afabe360085946f9217faa Mon Sep 17 00:00:00 2001 From: JamieDeMaria Date: Mon, 18 Sep 2023 15:25:11 -0400 Subject: [PATCH] test asset context instance check --- .../execution_tests/test_asset_execution_context.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/python_modules/dagster/dagster_tests/core_tests/execution_tests/test_asset_execution_context.py b/python_modules/dagster/dagster_tests/core_tests/execution_tests/test_asset_execution_context.py index 80cdb3fcbb729..6a550a2392cea 100644 --- a/python_modules/dagster/dagster_tests/core_tests/execution_tests/test_asset_execution_context.py +++ b/python_modules/dagster/dagster_tests/core_tests/execution_tests/test_asset_execution_context.py @@ -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])