From 6098d9978247dd7a1fac11583e2c37c68d2effa5 Mon Sep 17 00:00:00 2001 From: belthlemar Date: Wed, 18 Dec 2024 11:57:10 +0100 Subject: [PATCH] fix test --- antarest/launcher/adapters/local_launcher/local_launcher.py | 2 +- tests/launcher/test_local_launcher.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/antarest/launcher/adapters/local_launcher/local_launcher.py b/antarest/launcher/adapters/local_launcher/local_launcher.py index 7692403a0d..52dac03bc0 100644 --- a/antarest/launcher/adapters/local_launcher/local_launcher.py +++ b/antarest/launcher/adapters/local_launcher/local_launcher.py @@ -160,7 +160,7 @@ def _compute( ) finally: logger.info(f"Removing launch {job_id} export path at {export_path}") - shutil.rmtree(export_path) + shutil.rmtree(export_path, ignore_errors=True) def _import_launcher_logs(self, job_id: str) -> Dict[str, List[Path]]: logs_path = self.log_directory / job_id diff --git a/tests/launcher/test_local_launcher.py b/tests/launcher/test_local_launcher.py index 3ad04675da..84d04b2297 100644 --- a/tests/launcher/test_local_launcher.py +++ b/tests/launcher/test_local_launcher.py @@ -32,7 +32,7 @@ def launcher_config(tmp_path: Path) -> Config: Fixture to create a launcher config with a local launcher. """ solver_path = tmp_path.joinpath(SOLVER_NAME) - data = {"binaries": {"700": solver_path}, "enable_nb_cores_detection": True} + data = {"binaries": {"700": solver_path}, "enable_nb_cores_detection": True, "local_workspace": tmp_path} return Config(launcher=LauncherConfig(local=LocalConfig.from_dict(data)))