From 2d98a154bbb17ce7639415173c9d24d6eaec447e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20L=C3=BCdtke?= <727227+mathias-luedtke@users.noreply.github.com> Date: Mon, 5 Feb 2024 09:35:35 +0100 Subject: [PATCH] Ignore ModuleNotFoundError in entry point discovery MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mathias Lüdtke <727227+mathias-luedtke@users.noreply.github.com> --- launch_testing/launch_testing/pytest/hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch_testing/launch_testing/pytest/hooks.py b/launch_testing/launch_testing/pytest/hooks.py index de0035f76..dc04e774a 100644 --- a/launch_testing/launch_testing/pytest/hooks.py +++ b/launch_testing/launch_testing/pytest/hooks.py @@ -180,7 +180,7 @@ def find_launch_test_entrypoint(path): # Assume we got legacy path in earlier versions of pytest module = path.pyimport() return getattr(module, 'generate_test_description', None) - except SyntaxError: + except (ModuleNotFoundError, SyntaxError): return None