From 8c38b15f69a214bee84f3635253663a17b0d2e2a Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Mon, 9 Sep 2024 19:34:48 -0600 Subject: [PATCH] Add check when no contexts are found Signed-off-by: Travis F. Collins --- pytest_libiio/plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytest_libiio/plugin.py b/pytest_libiio/plugin.py index 7a4fc46..8d2dc93 100644 --- a/pytest_libiio/plugin.py +++ b/pytest_libiio/plugin.py @@ -237,6 +237,8 @@ class Object(object): request = Object() request.config = config pytest._context_table = find_contexts(config, get_hw_map(request), request) + if not pytest._context_table: + return # Add xdist marker to split tests based on context for item in items: