From 82407976f4ee2cba63fe53183d3e57f92f7fd8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AF=D0=BA=D0=B8=D0=BC=D0=B5=D0=BD=D0=BA=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=90=D0=BB=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D0=B0=D0=BD=D0=B4=D1=80=D0=BE=D0=B2=D0=B8=D1=87?= Date: Thu, 14 Nov 2024 14:17:23 +0300 Subject: [PATCH] [DOP-21294] fixes --- tests/test_server/test_lineage/test_run_lineage.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/test_server/test_lineage/test_run_lineage.py b/tests/test_server/test_lineage/test_run_lineage.py index 263df28..97e6546 100644 --- a/tests/test_server/test_lineage/test_run_lineage.py +++ b/tests/test_server/test_lineage/test_run_lineage.py @@ -793,20 +793,14 @@ async def test_get_run_lineage_with_depth( run = next(run for run in lineage.runs if run.id == output.run_id) # Go operations[first level] -> datasets[second level] - first_level_operations = [operation for operation in lineage.operations if operation.run_id == run.id] - first_level_operation_ids = {operation.id for operation in first_level_operations} - first_level_outputs = [output for output in lineage.outputs if output.operation_id in first_level_operation_ids] + first_level_outputs = [output for output in lineage.outputs if output.run_id == run.id] first_level_dataset_ids = {output.dataset_id for output in first_level_outputs} first_level_datasets = [dataset for dataset in lineage.datasets if dataset.id in first_level_dataset_ids] assert first_level_datasets # Go datasets[second level] -> operations[second level] -> runs[second level] second_level_inputs = [input for input in lineage.inputs if input.dataset_id in first_level_dataset_ids] - second_level_operation_ids = {input.operation_id for input in second_level_inputs} - first_level_operation_ids - second_level_operations = [ - operation for operation in lineage.operations if operation.id in second_level_operation_ids - ] - second_level_run_ids = {operation.run_id for operation in second_level_operations} - {run.id} + second_level_run_ids = {input.run_id for input in second_level_inputs} - {run.id} second_level_runs = [run for run in lineage.runs if run.id in second_level_run_ids] assert second_level_runs