Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Nov 13, 2023
1 parent f69d146 commit 8e5aa5a
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
asset,
op,
)
from dagster._core.errors import DagsterInvalidInvocationError, DagsterInvariantViolationError
from dagster._core.errors import DagsterInvalidInvocationError
from dagster._core.execution.context.invocation import build_op_context


Expand Down Expand Up @@ -428,11 +428,9 @@ def my_other_asset(context):
my_asset(ctx)
assert ctx.get_output_metadata("result") == {"foo": "bar"}

with pytest.raises(
DagsterInvariantViolationError,
match="attempted to log metadata for output 'result' more than once",
):
my_other_asset(ctx)
# context in unbound when used in another invocation. This allows the metadata to be
# added in my_other_asset
my_other_asset(ctx)


def test_async_assets_with_shared_context():
Expand Down Expand Up @@ -462,6 +460,7 @@ async def main():
assert result[0] == "one"
assert result[1] == "two"


def test_direct_invocation_resource_context_manager():
from dagster import resource

Expand Down

0 comments on commit 8e5aa5a

Please sign in to comment.