@@ -33,12 +33,12 @@ def model_with_setup(self, model):
3333 def test_setup (self , model_with_setup ):
3434 model , cfg_file = model_with_setup
3535
36- actual_input_dir = f" { data_folder } / directories/ input/ XX-dummy_2022-07-11-1200/ "
37- actual_output_dir = f" { data_folder } / directories/ output/ XX-dummy_2022-07-11-1200/ "
38- actual_cfg_file = f" { actual_input_dir } XX-dummy_2022-07-11-1200_config.txt"
36+ actual_input_dir = data_folder / " directories" / " input" / " XX-dummy_2022-07-11-1200"
37+ actual_output_dir = data_folder / " directories" / " output" / " XX-dummy_2022-07-11-1200"
38+ actual_cfg_file = str ( actual_input_dir / " XX-dummy_2022-07-11-1200_config.txt")
3939
40- assert actual_input_dir == model .configs ["InputPath" ]
41- assert actual_output_dir == model .configs ["OutputPath" ]
40+ assert actual_input_dir == Path ( model .configs ["InputPath" ])
41+ assert actual_output_dir == Path ( model .configs ["OutputPath" ])
4242 assert actual_cfg_file == cfg_file
4343
4444 # matlab log dir
@@ -47,7 +47,7 @@ def test_setup(self, model_with_setup):
4747 @patch ("subprocess.run" )
4848 def test_run (self , mocked_run , model_with_setup ):
4949
50- actual_cfg_file = f" { data_folder } / directories/ input/ XX-dummy_2022-07-11-1200_config.txt"
50+ actual_cfg_file = data_folder / " directories" / " input" / " XX-dummy_2022-07-11-1200_config.txt"
5151 output = (
5252 f"b'Reading config from { actual_cfg_file } \n \n "
5353 "The calculations start now \r \n The calculations end now \r '"
@@ -88,12 +88,12 @@ def model_with_setup(self, model, tmp_path):
8888 def test_setup (self , model_with_setup , tmp_path ):
8989 model , cfg_file = model_with_setup
9090
91- actual_input_dir = f" { tmp_path } / input/ dummy_2022-07-11-1200/ "
92- actual_output_dir = f" { tmp_path } / output/ dummy_2022-07-11-1200/ "
93- actual_cfg_file = f" { actual_input_dir } dummy_2022-07-11-1200_config.txt"
91+ actual_input_dir = tmp_path / " input" / " dummy_2022-07-11-1200"
92+ actual_output_dir = tmp_path / " output" / " dummy_2022-07-11-1200"
93+ actual_cfg_file = str ( actual_input_dir / " dummy_2022-07-11-1200_config.txt")
9494
95- assert actual_input_dir == model .configs ["InputPath" ]
96- assert actual_output_dir == model .configs ["OutputPath" ]
95+ assert actual_input_dir == Path ( model .configs ["InputPath" ])
96+ assert actual_output_dir == Path ( model .configs ["OutputPath" ])
9797 assert actual_cfg_file == cfg_file
9898 assert model .configs ["NumberOfTimeSteps" ] == "5"
9999
@@ -107,7 +107,8 @@ def test_configs(self, model_with_setup):
107107
108108 @patch ("subprocess.run" )
109109 def test_run (self , mocked_run , model_with_setup , tmp_path ):
110- actual_cfg_file = f"{ tmp_path } /input/dummy_2022-07-11-1200_config.txt"
110+
111+ actual_cfg_file = tmp_path / "input" / "dummy_2022-07-11-1200_config.txt"
111112 output = (
112113 f"b'Reading config from { actual_cfg_file } \n \n "
113114 "The calculations start now \r \n The calculations end now \r '"
0 commit comments