File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -661,8 +661,8 @@ def test_builtin_settings(mixing_elbow_case_data_session):
661
661
else :
662
662
with pytest .raises (RuntimeError ):
663
663
CustomVectors (settings_source = solver )
664
- tmp_save_path = tempfile .mkdtemp (dir = pyfluent .EXAMPLES_PATH )
665
- project_file = Path (tmp_save_path ) / "mixing_elbow_param.flprj"
664
+ tmp_save_path = Path ( tempfile .mkdtemp (dir = pyfluent .EXAMPLES_PATH ) )
665
+ project_file = Path (tmp_save_path . parts [ - 1 ] ) / "mixing_elbow_param.flprj"
666
666
solver .settings .parametric_studies .initialize (project_filename = str (project_file ))
667
667
assert ParametricStudies (settings_source = solver ) == solver .parametric_studies
668
668
assert (
Original file line number Diff line number Diff line change @@ -554,10 +554,10 @@ def test_fluent_automatic_transcript(monkeypatch):
554
554
with monkeypatch .context () as m :
555
555
m .setattr (pyfluent , "FLUENT_AUTOMATIC_TRANSCRIPT" , True )
556
556
with TemporaryDirectory (dir = pyfluent .EXAMPLES_PATH ) as tmp_dir :
557
- with pyfluent .launch_fluent (container_dict = dict (working_dir = tmp_dir )):
557
+ with pyfluent .launch_fluent (container_dict = dict (mount_source = tmp_dir )):
558
558
assert list (Path (tmp_dir ).glob ("*.trn" ))
559
559
with TemporaryDirectory (dir = pyfluent .EXAMPLES_PATH ) as tmp_dir :
560
- with pyfluent .launch_fluent (container_dict = dict (working_dir = tmp_dir )):
560
+ with pyfluent .launch_fluent (container_dict = dict (mount_source = tmp_dir )):
561
561
assert not list (Path (tmp_dir ).glob ("*.trn" ))
562
562
563
563
Original file line number Diff line number Diff line change @@ -594,7 +594,6 @@ def test_general_exception_behaviour_in_session(new_solver_session):
594
594
case_file = examples .download_file (
595
595
"mixing_elbow.cas.h5" ,
596
596
"pyfluent/mixing_elbow" ,
597
- return_without_path = False ,
598
597
)
599
598
solver .settings .file .read (file_type = "case" , file_name = case_file )
600
599
solver .file .write (file_name = "sample.cas.h5" , file_type = "case" )
@@ -660,14 +659,18 @@ def test_app_utilities_new_and_old(mixing_elbow_settings_session):
660
659
661
660
tmp_dir = tempfile .mkdtemp (dir = pyfluent .EXAMPLES_PATH )
662
661
663
- solver .chdir (tmp_dir )
662
+ # when running in a container, only the randomly generated folder name will be seen
663
+ # the full paths will be different between host and container
664
+ tmp_folder = Path (tmp_dir ).parts [- 1 ]
665
+
666
+ solver .chdir (tmp_folder )
664
667
665
668
cortex_info = solver ._app_utilities .get_controller_process_info ()
666
669
solver_info = solver ._app_utilities .get_solver_process_info ()
667
670
668
- assert Path (cortex_info .working_directory ) == Path ( tmp_dir )
671
+ assert Path (cortex_info .working_directory ). parts [ - 1 ] == tmp_folder
669
672
670
- assert Path (solver_info .working_directory ) == Path ( tmp_dir )
673
+ assert Path (solver_info .working_directory ). parts [ - 1 ] == tmp_folder
671
674
672
675
673
676
@pytest .mark .standalone
You can’t perform that action at this time.
0 commit comments