diff --git a/python_modules/dagster/dagster_tests/core_tests/test_op_invocation.py b/python_modules/dagster/dagster_tests/core_tests/test_op_invocation.py index 38099c6335e90..eb13cd7a98a10 100644 --- a/python_modules/dagster/dagster_tests/core_tests/test_op_invocation.py +++ b/python_modules/dagster/dagster_tests/core_tests/test_op_invocation.py @@ -1245,6 +1245,9 @@ def non_asset_op(context): ) as context: my_asset(context) + with build_op_context( + partition_key="2023-02-02", + ) as context: with pytest.raises(DagsterInvalidPropertyError, match="does not have an assets definition"): non_asset_op(context)