-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RFC] dont enforce output values to be passed for multi_asset
- Loading branch information
1 parent
f813d72
commit 360c246
Showing
6 changed files
with
163 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
python_modules/dagster/dagster_tests/definitions_tests/test_op_definition.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from dagster import In, OpDefinition, Out, Output, job | ||
|
||
|
||
def test_op_def_direct(): | ||
def the_op_fn(_, inputs): | ||
assert inputs["x"] == 5 | ||
yield Output(inputs["x"] + 1, output_name="the_output") | ||
|
||
op_def = OpDefinition( | ||
the_op_fn, "the_op", ins={"x": In(dagster_type=int)}, outs={"the_output": Out(int)} | ||
) | ||
|
||
@job | ||
def the_job(x): | ||
op_def(x) | ||
|
||
result = the_job.execute_in_process(input_values={"x": 5}) | ||
assert result.success |