Skip to content

Commit

Permalink
Update runner.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxHalford committed Sep 24, 2024
1 parent ab03ccb commit b5d8427
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lea/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,9 @@ def test(self, select_views: list[str], freeze_unselected: bool, threads: int, f

# List assertion tests
assertion_tests = [
test.with_context(table_reference_mapping=table_reference_mapping) for view in self.regular_views.values() for test in view.yield_assertion_tests()
test.with_context(table_reference_mapping=table_reference_mapping)
for view in self.regular_views.values()
for test in view.yield_assertion_tests()
]
self.log(f"Found {len(assertion_tests):,d} assertion tests")

Expand All @@ -473,7 +475,12 @@ def test(self, select_views: list[str], freeze_unselected: bool, threads: int, f
if
(
# Run tests without any dependency whatsoever
not (test_dependencies := {tuple(part for part in view_key if part != 'lea_wap') for view_key in test.dependent_view_keys})
not (
test_dependencies := {
tuple(part for part in view_key if part != "lea_wap")
for view_key in test.dependent_view_keys
}
)
# Run tests which don't depend on any table in the views directory
or all(test_dep[0] not in self.dag.schemas for test_dep in test_dependencies)
# Run tests which have at least one dependency with the selected views
Expand Down

0 comments on commit b5d8427

Please sign in to comment.