Skip to content

Commit

Permalink
feat: Add store_skips argument to run_input_data (#3706)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jholecek-rh authored Mar 16, 2023
1 parent 3e55f50 commit e371229
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion insights/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e371229

Please sign in to comment.