Fetch memory files from memory_folder/conformance_test_memory.
(memory_folder: str)
| 15 | |
| 16 | @staticmethod |
| 17 | def fetch_memory_files(memory_folder: str) -> tuple[list[str], dict[str, str]]: |
| 18 | """Fetch memory files from memory_folder/conformance_test_memory.""" |
| 19 | memory_path = os.path.join(memory_folder, CONFORMANCE_TEST_MEMORY_SUBFOLDER) |
| 20 | if not os.path.exists(memory_path): |
| 21 | return [], {} |
| 22 | memory_files = file_utils.list_all_text_files(memory_path) |
| 23 | memory_files_content = file_utils.get_existing_files_content(memory_path, memory_files) |
| 24 | console.debug(f"Loaded {len(memory_files_content)} memory files.") |
| 25 | return memory_files, memory_files_content |
| 26 | |
| 27 | def __init__(self, codeplain_api, module_name: str, conformance_tests_folder: str): |
| 28 | self.codeplain_api = codeplain_api |