Skip to content

Commit 292bbbe

Browse files
author
Thierry RAMORASOAVINA
committed
Fix a border case in cleaning in KhiopsDockerRunnerTests
1 parent 31a8c68 commit 292bbbe

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_remote_access.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,11 @@ def tearDownClass(cls):
453453

454454
# Cleanup: remove directories created in `setUpClass`
455455
if docker_runner_config_exists():
456-
shutil.rmtree(kh.get_runner().samples_dir)
457-
shutil.rmtree(cls._khiops_temp_dir)
456+
457+
# If Khiops samples and temp dirs exist, remove them
458+
with suppress(FileNotFoundError):
459+
shutil.rmtree(kh.get_runner().samples_dir)
460+
shutil.rmtree(cls._khiops_temp_dir)
458461

459462
# Reset the Khiops Python runner to the initial one
460463
kh.set_runner(cls.initial_runner)

0 commit comments

Comments
 (0)