Skip to content

Commit

Permalink
More unit test OS-agnosticism
Browse files Browse the repository at this point in the history
  • Loading branch information
softwareengineerprogrammer committed Oct 3, 2024
1 parent e49454e commit 104fe35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/geophires_x_tests/test_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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()
Expand Down

0 comments on commit 104fe35

Please sign in to comment.