Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
briantu committed Oct 14, 2024
1 parent b2e60d7 commit 2d44d5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def toposorted_asset_keys(self) -> Sequence[AssetKey]:
]

@cached_property
def toposorted_entity_keys(self) -> Sequence[Sequence[EntityKey]]:
def toposorted_entity_keys_by_level(self) -> Sequence[Sequence[EntityKey]]:
"""Return topologically sorted levels for entity keys in graph. Keys with the same topological level are
sorted alphabetically to provide stability.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ async def _evaluate_entity_async(entity_key: EntityKey) -> None:
)
num_evaluated += 1

for topo_level in self.asset_graph.toposorted_entity_keys:
for topo_level in self.asset_graph.toposorted_entity_keys_by_level:
coroutines = [
_evaluate_entity_async(entity_key)
for entity_key in topo_level
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,11 @@ def Bc(): ...
asset_graph = asset_graph_from_assets([A, B, Ac, Bc])

assert asset_graph.toposorted_asset_keys == [A.key, B.key]
assert asset_graph.toposorted_entity_keys == [A.key, Ac.check_key, B.key, Bc.check_key]
assert asset_graph.toposorted_entity_keys_by_level == [
[A.key],
[Ac.check_key, B.key],
[Bc.check_key],
]


def test_required_assets_and_checks_by_key_asset_decorator(
Expand Down

0 comments on commit 2d44d5a

Please sign in to comment.