Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
let inputs arrive later
Browse files Browse the repository at this point in the history
  • Loading branch information
masci committed Oct 18, 2023
1 parent 9c4998b commit 7308030
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/pipeline/integration/test_joiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ def test_joiner(tmp_path):
pipeline = Pipeline()
pipeline.add_component("hello_one", Hello())
pipeline.add_component("hello_two", Hello())
pipeline.add_component("hello_three", Hello())
pipeline.add_component("joiner", StringJoiner())
pipeline.connect("hello_one", "joiner")
pipeline.connect("hello_one", "hello_two")
pipeline.connect("hello_two", "joiner")
pipeline.connect("hello_three", "joiner")
pipeline.draw(tmp_path / "joiner_pipeline.png")

results = pipeline.run({"hello_one": {"word": "world"}, "hello_two": {"word": "my friend"}})
assert results == {"joiner": {"output": "Hello, world! Hello, my friend!"}}
results = pipeline.run({"hello_one": {"word": "world"}, "hello_three": {"word": "my friend"}})
assert results == {"joiner": {"output": "Hello, my friend! Hello, Hello, world!!"}}


if __name__ == "__main__":
Expand Down

0 comments on commit 7308030

Please sign in to comment.