Message48939
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. |
|
Date |
User |
Action |
Args |
2007-08-23 15:44:22 | admin | link | issue1339796 messages |
2007-08-23 15:44:22 | admin | create | |
|