Skip to content

Commit e79df49

Browse files
use os path for path count in display as well
1 parent e44eab7 commit e79df49

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

tests/test_catalog.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,6 @@ def test_generate_subcatalogs_works_for_subcatalogs_with_same_ids(self) -> None:
843843
Path(path_to_parent).parts[1:]
844844
) # Skip drive letter if present (Windows)
845845

846-
## D: creates failure for py3.13 on windows
847846
assert len(subcats) == 2, f" for item '{item.id}'"
848847

849848
def test_map_items(self) -> None:

tests/test_layout.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import os
12
import posixpath
3+
import sys
24
import unittest
35
from collections.abc import Callable
46
from datetime import datetime, timedelta
@@ -413,6 +415,15 @@ class AsIsLayoutStrategyTest(unittest.TestCase):
413415
def setUp(self) -> None:
414416
self.strategy = AsIsLayoutStrategy()
415417

418+
path_includes_drive: bool = (
419+
sys.version_info.major == 3
420+
and sys.version_info.minor >= 13
421+
and os.name == "nt"
422+
)
423+
self.expected_local_href = (
424+
"/an/href" if not path_includes_drive else "D:/an/href"
425+
)
426+
416427
def test_catalog(self) -> None:
417428
cat = pystac.Catalog(id="test", description="test desc")
418429
with self.assertRaises(ValueError):

0 commit comments

Comments
 (0)