Skip to content

Commit c46b277

Browse files
committed
Create remote output dir if not existing, in remote tests
1 parent e09a9d2 commit c46b277

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_remote_access.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# see the "LICENSE.md" file for more details. #
66
######################################################################################
77
"""Integration tests with remote filesystems and Khiops runners"""
8-
import io
98
import os
109
import shutil
1110
import signal
@@ -17,8 +16,6 @@
1716
from contextlib import suppress
1817
from urllib.request import Request, urlopen
1918

20-
import pandas as pd
21-
2219
import khiops.core as kh
2320
import khiops.core.internals.filesystems as fs
2421
from khiops.core.internals.runner import KhiopsLocalRunner
@@ -171,6 +168,8 @@ def test_train_predictor_with_remote_access(self):
171168
self.results_dir_root(),
172169
f"test_{self.remote_access_test_case()}_remote_files_{uuid.uuid4()}",
173170
)
171+
if not fs.exists(output_dir):
172+
fs.make_dir(output_dir)
174173
report_file_path = fs.get_child_path(output_dir, "IrisAnalysisResults.khj")
175174

176175
# When using `kh`, the log file will be by default
@@ -197,10 +196,12 @@ def test_train_predictor_fail_and_log_with_remote_access(self):
197196

198197
# no cleaning required as an exception would be raised
199198
# without any result produced
200-
output_dir = fs.get_child_path(
199+
self.folder_name_to_clean_in_teardown = output_dir = fs.get_child_path(
201200
self.results_dir_root(),
202201
f"test_{self.remote_access_test_case()}_remote_files_{uuid.uuid4()}",
203202
)
203+
if not fs.exists(output_dir):
204+
fs.make_dir(output_dir)
204205
report_file_path = fs.get_child_path(
205206
output_dir,
206207
"IrisAnalysisResults.khj",

0 commit comments

Comments
 (0)