Skip to content

Commit

Permalink
correct is_windows in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KeynesYouDigIt committed Nov 16, 2024
1 parent 5924e07 commit 2d987ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,13 @@ def test_is_absolute_href_os_aware(self) -> None:
# Windows requires a drive name when python > 3.13 (https://docs.python.org/3/library/os.path.html#os.path.isabs)
is_py_3_13: bool = sys.version_info.major == 3 and sys.version_info.minor >= 13

is_windows = os.name != "nt"
is_windows = os.name == "nt"

test_cases = [
("/item.json", not (is_windows and is_py_3_13)),
("/home/someuser/Downloads/item.json", not (is_windows and is_py_3_13)),
# ("d:/item.json", (is_windows and is_py_3_13)),
# ("c:/files/more_files/item.json", (is_windows and is_py_3_13)),
("d:/item.json", (is_windows and is_py_3_13)),
("c:/files/more_files/item.json", (is_windows and is_py_3_13)),
]

for href, expected in test_cases:
Expand Down

0 comments on commit 2d987ff

Please sign in to comment.