From 268120c9ac90a65be0e653f9c0589be52f3bd99d Mon Sep 17 00:00:00 2001 From: Michael Rapp Date: Fri, 13 Dec 2024 02:43:03 +0100 Subject: [PATCH] Fix search for test directories. --- build_system/targets/testing/python/modules.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_system/targets/testing/python/modules.py b/build_system/targets/testing/python/modules.py index 965f1ad3e..d3a55dc23 100644 --- a/build_system/targets/testing/python/modules.py +++ b/build_system/targets/testing/python/modules.py @@ -51,11 +51,12 @@ def find_test_directories(self) -> List[str]: :return: A list that contains the paths of the directories that have been found """ - return self.test_file_search \ + test_files = self.test_file_search \ .exclude_subdirectories_by_name(self.build_directory_name) \ .filter_by_substrings(starts_with='test_') \ .filter_by_file_type(FileType.python()) \ .list(self.root_directory) + return list({path.dirname(test_file) for test_file in test_files}) def __str__(self) -> str: return 'PythonTestModule {root_directory="' + self.root_directory + '"}'