From 104fe35a0de8185862d5a603456fe0d17e12428d Mon Sep 17 00:00:00 2001 From: softwareengineerprogrammer <4056124+softwareengineerprogrammer@users.noreply.github.com> Date: Thu, 3 Oct 2024 13:58:18 -0700 Subject: [PATCH] More unit test OS-agnosticism --- tests/geophires_x_tests/test_outputs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/geophires_x_tests/test_outputs.py b/tests/geophires_x_tests/test_outputs.py index 8bca685e..5cd6c9a2 100644 --- a/tests/geophires_x_tests/test_outputs.py +++ b/tests/geophires_x_tests/test_outputs.py @@ -14,7 +14,7 @@ def test_relative_output_file_path(self): m = self._new_model(input_file=input_file, original_cwd=Path('/tmp/')) # noqa: S108 html_filepath = Path(m.outputs.html_output_file.value) self.assertTrue(html_filepath.is_absolute()) - self.assertEqual(str(html_filepath), str(Path('/tmp/foo.html'))) # noqa: S108 + self.assertEqual(str(html_filepath).replace('D:', ''), str(Path('/tmp/foo.html'))) # noqa: S108 def test_absolute_output_file_path(self): input_file = GeophiresInputParameters( @@ -23,7 +23,7 @@ def test_absolute_output_file_path(self): m = self._new_model(input_file=input_file, original_cwd=Path('/tmp/')) # noqa: S108 html_filepath = Path(m.outputs.html_output_file.value) self.assertTrue(html_filepath.is_absolute()) - self.assertEqual(str(html_filepath), str(Path('/home/user/my-geophires-project/foo.html'))) + self.assertEqual(str(html_filepath).replace('D:', ''), str(Path('/home/user/my-geophires-project/foo.html'))) def _new_model(self, input_file=None, original_cwd=None) -> Model: stash_cwd = Path.cwd()