@@ -45,7 +45,9 @@ def test_relative_output_file_path(self):
45
45
m = self ._new_model (input_file = input_file , original_cwd = Path ('/tmp/' )) # noqa: S108
46
46
html_filepath = Path (m .outputs .html_output_file .value )
47
47
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 )
49
51
50
52
def test_absolute_output_file_path (self ):
51
53
input_file = GeophiresInputParameters (
@@ -54,17 +56,20 @@ def test_absolute_output_file_path(self):
54
56
m = self ._new_model (input_file = input_file , original_cwd = Path ('/tmp/' )) # noqa: S108
55
57
html_filepath = Path (m .outputs .html_output_file .value )
56
58
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
+ )
57
62
63
+ def _assert_file_paths_equal (self , file_path_1 , file_path_2 ):
58
64
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 )
62
66
except AssertionError as e :
63
67
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
67
71
# - 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
68
73
_log .warning (
69
74
f'Ignoring absolute output file path test error since we appear to be running on Windows '
70
75
f'in GitHub Actions ({ e !s} )'
0 commit comments