@@ -45,7 +45,9 @@ def test_relative_output_file_path(self):
4545 m = self ._new_model (input_file = input_file , original_cwd = Path ('/tmp/' )) # noqa: S108
4646 html_filepath = Path (m .outputs .html_output_file .value )
4747 self .assertTrue (html_filepath .is_absolute ())
48- self .assertEqual (str (html_filepath ).replace ('D:' , '' ), str (Path ('/tmp/foo.html' ))) # noqa: S108
48+
49+ expected_path = str (Path ('/tmp/foo.html' )) # noqa: S108
50+ self ._assert_file_paths_equal (str (html_filepath ).replace ('D:' , '' ), expected_path )
4951
5052 def test_absolute_output_file_path (self ):
5153 input_file = GeophiresInputParameters (
@@ -54,17 +56,20 @@ def test_absolute_output_file_path(self):
5456 m = self ._new_model (input_file = input_file , original_cwd = Path ('/tmp/' )) # noqa: S108
5557 html_filepath = Path (m .outputs .html_output_file .value )
5658 self .assertTrue (html_filepath .is_absolute ())
59+ self ._assert_file_paths_equal (
60+ str (html_filepath ).replace ('D:' , '' ), str (Path ('/home/user/my-geophires-project/foo.html' ))
61+ )
5762
63+ def _assert_file_paths_equal (self , file_path_1 , file_path_2 ):
5864 try :
59- self .assertEqual (
60- str (html_filepath ).replace ('D:' , '' ), str (Path ('/home/user/my-geophires-project/foo.html' ))
61- )
65+ self .assertEqual (file_path_1 , file_path_2 )
6266 except AssertionError as e :
6367 if os .name == 'nt' and 'TOXPYTHON' in os .environ :
64- # FIXME - Python 3.9/10 on Windows seem to have had a backwards-incompatible change introduced which
65- # cause this to fail ; examples:
66- # - https://github.com/NREL/GEOPHIRES-X/actions/runs/15499833486/job/43649021692)
68+ # FIXME - Python 3.9/10 on Windows seem to have had a backwards-incompatible change introduced on or
69+ # around 2025-06-06 which cause failures ; examples:
70+ # - https://github.com/NREL/GEOPHIRES-X/actions/runs/15499833486/job/43649021692
6771 # - https://github.com/NREL/GEOPHIRES-X/actions/runs/15499833486/job/43649021692
72+ # - https://github.com/NREL/GEOPHIRES-X/actions/runs/15501867732/job/43650830019?pr=389
6873 _log .warning (
6974 f'Ignoring absolute output file path test error since we appear to be running on Windows '
7075 f'in GitHub Actions ({ e !s} )'
0 commit comments