Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
test: Update normalize path test
Browse files Browse the repository at this point in the history
  • Loading branch information
lsetiawan committed Jan 23, 2024
1 parent 809d4c1 commit 7c8342f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@


def test_normalize_path():
path_obj = Path().joinpath("path", "to", "file.txt")
# Test with a string path
path_str = str(Path().joinpath("path", "to", "file.txt"))
path_str = str(path_obj)
normalized_path = _normalize_path(path_str)
assert normalized_path == Path(path_str)
assert str(normalized_path), path_str
assert normalized_path == path_obj.absolute()
assert str(normalized_path) == str(path_obj.absolute())

# Test with a Path object
path_obj = Path(path_str)
normalized_path = _normalize_path(path_obj)
assert normalized_path == path_obj
assert normalized_path == path_obj.absolute()


def test_to_and_from_file():
Expand Down

0 comments on commit 7c8342f

Please sign in to comment.