This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients
Date 2007-03-21.16:12:26
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The test fails on Windows. In particular, this test:

self.assertEqual(posixpath.relpath(os.path.abspath("a")), "a")

fails. os.path.abspath("a") gives something like r"c:\python26\a". posixpath.relpath is then not able to cope with it. As a result, it returns r"c:\python26\a" as the relative path.

Using posixpath.abspath doesn't help, either, since that will give r"c:\python26/a" which relpath then still cannot process correctly.

One solution would be to use pass a POSIX path and start path to relpath; the other would be to use os.path in both cases.
os.path.relpath(os.path.abspath("a")) does indeed give "a" on Windows.
History
Date User Action Args
2007-08-23 15:44:22adminlinkissue1339796 messages
2007-08-23 15:44:22admincreate