From e371229ec5287da370c1f31436fe6e8b6d317a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Hole=C4=8Dek?= <71874510+jholecek-rh@users.noreply.github.com> Date: Thu, 16 Mar 2023 04:17:00 +0100 Subject: [PATCH] feat: Add store_skips argument to run_input_data (#3706) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #3663 added a `Broker.store_skips` attribute that allows for storing `SkipComponent` exceptions in the broker. This commit makes the feature available in tests based on the `run_input_data` function. Signed-off-by: Jan Holeček <71874510+jholecek-rh@users.noreply.github.com> --- insights/tests/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/insights/tests/__init__.py b/insights/tests/__init__.py index 82b06bdcde..19d675a0c8 100644 --- a/insights/tests/__init__.py +++ b/insights/tests/__init__.py @@ -105,13 +105,14 @@ def deep_compare(result, expected): assert eq(result, expected), result -def run_input_data(component, input_data): +def run_input_data(component, input_data, store_skips=False): broker = dr.Broker() for k, v in input_data.data.items(): broker[k] = v graph = dr.get_dependency_graph(component) broker = dr.run(graph, broker=broker) + broker.store_skips = store_skips for v in broker.tracebacks.values(): print(v) return broker