Skip to content

Commit d903d9e

Browse files
committed
Add some print debugging
1 parent 2dae057 commit d903d9e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pystac/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@ def _make_relative_href_path(
213213
# posixpath doesn't play well with windows drive letters, so we have to use
214214
# the os-specific path library for the relpath function. This means we can
215215
# only handle windows paths on windows machines.
216+
print("start_dir: ", start_dir)
217+
print("source_path:", source_path)
216218
relpath = make_posix_style(os.path.relpath(source_path, start_dir))
219+
print("relpath:", relpath)
217220

218221
# Ensure we retain a trailing slash from the original source path
219222
if parsed_source.path.endswith("/"):

tests/test_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ def test_make_absolute_href(self) -> None:
178178
for source_href, start_href, expected in test_cases:
179179
actual = make_absolute_href(source_href, start_href)
180180
if expected.startswith("file://"):
181-
_, actual = os.path.splitdrive(actual.replace("file:///", ""))
182-
actual = f"file:///{actual}"
181+
_, actual = os.path.splitdrive(actual.replace("file://", ""))
182+
actual = f"file://{actual}"
183183
else:
184184
_, actual = os.path.splitdrive(actual)
185185
self.assertEqual(actual, expected)

0 commit comments

Comments
 (0)