Skip to content

Commit

Permalink
same name for both
Browse files Browse the repository at this point in the history
  • Loading branch information
Udiknedormin committed Nov 19, 2020
1 parent eef61fb commit 83e8b84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sdk/python/tests/compiler/compiler_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,9 @@ def test_keyword_only_argument_for_pipeline_func_identity(self):
test_data_dir = os.path.join(os.path.dirname(__file__), 'testdata')
sys.path.append(test_data_dir)

# `@pipeline` is needed to make name the same for both functions

@pipeline(name="pipeline_func")
def pipeline_func_arg(foo_arg: str, bar_arg: str):
dsl.ContainerOp(
name='foo',
Expand All @@ -1069,6 +1072,7 @@ def pipeline_func_arg(foo_arg: str, bar_arg: str):
arguments=[foo_arg, ' and ', bar_arg]
)

@pipeline(name="pipeline_func")
def pipeline_func_kwarg(foo_arg: str, *, bar_arg: str):
return pipeline_func_arg(foo_arg, bar_arg)

Expand Down

0 comments on commit 83e8b84

Please sign in to comment.