Skip to content

Commit

Permalink
sort unit test assertion to reduce brittleness
Browse files Browse the repository at this point in the history
  • Loading branch information
fritz-astronomer committed Aug 28, 2024
1 parent 31e39e7 commit 1442e11
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions tests/dag_factory/dag_factory_translation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
def test_dag_factory_translation(change_test_dir):
sys.path += [".", "workflow"]
actual = translation_ruleset.translate_fn(translation_ruleset, "workflow/")
assert list(actual.dags.keys()) == [
"example_dag",
"example_dag2",
"example_dag3",
"example_dag4",
"test_expand",
]
assert sorted(list(list(actual.dags.values())[0].tasks.keys())) == sorted(
assert sorted(actual.dags.keys()) == sorted(
[
"example_dag",
"example_dag2",
"example_dag3",
"example_dag4",
"test_expand",
]
)
assert sorted(actual.dags["example_dag"].tasks.keys()) == sorted(
["task_1", "task_2", "task_3"]
)
assert sorted(
list(list(actual.dags.values())[0].tasks["task_1"].downstream)
) == sorted(["task_2", "task_3"])
assert sorted(actual.dags["example_dag"].tasks["task_1"].downstream) == sorted(
["task_2", "task_3"]
)

0 comments on commit 1442e11

Please sign in to comment.