Closed Julian closed 1 year ago
Tests are failing on Windows, I suspect because relative_to is failing to match the descendants.
Tests are failing on Windows, I suspect because relative_to is failing to match the descendants.
The issue is that str()
of a Path
forces separators to os.sep
.
(Pdb) cand.relative_to(self)
WindowsPath('b/c.txt')
(Pdb) str(cand.relative_to(self))
'b\\c.txt'
Covers:
along with an implementation of Path.eq for testing/comparison purposes.
Part of the implementation here makes use of CPython internals (from the pathlib module) but it seems to handle fixing that requires some refactoring upstream.