]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Make `relpath` doctest Windows-compatible.
authorChristopher Lenz <cmlenz@gmail.com>
Mon, 18 Jun 2007 17:55:31 +0000 (17:55 +0000)
committerChristopher Lenz <cmlenz@gmail.com>
Mon, 18 Jun 2007 17:55:31 +0000 (17:55 +0000)
babel/util.py

index a0eedf4e0b2f210d7a18a187975f832b813afffe..168679dec50d4afd18cb10b90fc94c9fb89402f4 100644 (file)
@@ -123,11 +123,11 @@ except AttributeError:
     def relpath(path, start='.'):
         """Compute the relative path to one path from another.
         
-        >>> relpath('foo/bar.txt', '')
+        >>> relpath('foo/bar.txt', '').replace(os.sep, '/')
         'foo/bar.txt'
-        >>> relpath('foo/bar.txt', 'foo')
+        >>> relpath('foo/bar.txt', 'foo').replace(os.sep, '/')
         'bar.txt'
-        >>> relpath('foo/bar.txt', 'baz')
+        >>> relpath('foo/bar.txt', 'baz').replace(os.sep, '/')
         '../foo/bar.txt'
         
         :return: the relative path