55# see the "LICENSE.md" file for more details. #
66######################################################################################
77"""Integration tests with remote filesystems and Khiops runners"""
8- import io
98import os
109import shutil
1110import signal
1716from contextlib import suppress
1817from urllib .request import Request , urlopen
1918
20- import pandas as pd
21-
2219import khiops .core as kh
2320import khiops .core .internals .filesystems as fs
2421from khiops .core .internals .runner import KhiopsLocalRunner
@@ -171,6 +168,16 @@ 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+
172+ # Attempt to make directory if not existing:
173+ # - make dir if local
174+ # - else, write "dir-like" object
175+ if not fs .exists (output_dir ):
176+ if fs .is_local_resource (output_dir ):
177+ fs .make_dir (output_dir )
178+ else :
179+ fs .write (f"{ output_dir } /" )
180+
174181 report_file_path = fs .get_child_path (output_dir , "IrisAnalysisResults.khj" )
175182
176183 # When using `kh`, the log file will be by default
@@ -197,10 +204,20 @@ def test_train_predictor_fail_and_log_with_remote_access(self):
197204
198205 # no cleaning required as an exception would be raised
199206 # without any result produced
200- output_dir = fs .get_child_path (
207+ self . folder_name_to_clean_in_teardown = output_dir = fs .get_child_path (
201208 self .results_dir_root (),
202209 f"test_{ self .remote_access_test_case ()} _remote_files_{ uuid .uuid4 ()} " ,
203210 )
211+
212+ # Attempt to make directory if not existing:
213+ # - make dir if local
214+ # - else, write "dir-like" object
215+ if not fs .exists (output_dir ):
216+ if fs .is_local_resource (output_dir ):
217+ fs .make_dir (output_dir )
218+ else :
219+ fs .write (f"{ output_dir } /" )
220+
204221 report_file_path = fs .get_child_path (
205222 output_dir ,
206223 "IrisAnalysisResults.khj" ,
0 commit comments