Skip to content

Commit

Permalink
Correcting function call and comment. RE:natcap#1065
Browse files Browse the repository at this point in the history
  • Loading branch information
phargogh committed Dec 14, 2023
1 parent 13baa31 commit 0aa37ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ def setUp(self):
def tearDown(self):
shutil.rmtree(self.workspace_dir)

@unittest.skipIf(platform.system == 'Windows',
@unittest.skipIf(platform.system() == 'Windows',
"Function behavior differs across systems.")
def test_os_path_normalization_linux(self):
"""Utils: test path separator conversion Win to Linux."""
Expand All @@ -1201,14 +1201,14 @@ def test_os_path_normalization_linux(self):
path = utils.expand_path(rel_path, relative_to)
self.assertEquals(path, expected_path)

@unittest.skipIf(platform.system != 'Windows',
@unittest.skipIf(platform.system() != 'Windows',
"Function behavior differs across systems.")
def test_os_path_normalization_windows(self):
"""Utils: test path separator conversion Mac/Linux to Windows."""
from natcap.invest import utils

# Assumption: a path was created on Windows and is now being loaded on
# a Mac or Linux computer.
# Assumption: a path was created on mac/linux and is now being loaded
# on a Windows computer.
rel_path = "foo/bar.shp"
relative_to = os.path.join(self.workspace_dir, 'test.csv')
expected_path = os.path.join(self.workspace_dir, "foo\\bar.shp")
Expand Down

0 comments on commit 0aa37ce

Please sign in to comment.