Skip to content

Commit

Permalink
Add tests for show pipeline-graph and show task-graph.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Sep 9, 2023
1 parent a8c7e69 commit ffb609e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/test_cmdLineFwk.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,31 @@ def testShowPipeline(self):
output = stream.read().strip()
self.assertEqual("### Configuration for task `task'", output)

stream = StringIO()
show = ShowInfo(["pipeline-graph"], stream=stream) # No match
show.show_pipeline_info(pipeline, None)
stream.seek(0)
output = stream.read().strip()
self.assertEqual(
"\n".join(
[
"○ add_dataset_in",
"│",
"■ task",
"│",
"◍ add_dataset_out, add2_dataset_out",
]
),
output,
)

stream = StringIO()
show = ShowInfo(["task-graph"], stream=stream) # No match
show.show_pipeline_info(pipeline, None)
stream.seek(0)
output = stream.read().strip()
self.assertEqual("■ task", output)

stream = StringIO()
show = ShowInfo(["config=task::addEnd"], stream=stream) # Match but warns
show.show_pipeline_info(pipeline, None)
Expand Down

0 comments on commit ffb609e

Please sign in to comment.