-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
compatibility 🤝Compatibility with stdlib pathlibCompatibility with stdlib pathlib
Description
This is currently incorrectly implemented and incorrectly checked in the tests.
universal_pathlib/upath/tests/cases.py
Lines 290 to 302 in c31e910
| def test_rename2(self): | |
| upath = self.path.joinpath("folder1/file2.txt") | |
| target = "file2_renamed.txt" | |
| moved = upath.rename(target) | |
| target_path = upath.parent.joinpath(target).resolve() | |
| assert target_path == moved | |
| assert not upath.exists() | |
| assert moved.exists() | |
| # reverse with a relative path as UPath | |
| back = moved.rename(UPath("file2.txt")) | |
| assert back == upath | |
| assert not moved.exists() | |
| assert back.exists() |
universal_pathlib/upath/core.py
Line 1792 in c31e910
| def rename( |
Metadata
Metadata
Assignees
Labels
compatibility 🤝Compatibility with stdlib pathlibCompatibility with stdlib pathlib