changeset 130:d4bdf67c7734

Make `relpath` doctest Windows-compatible.
author cmlenz
date Mon, 18 Jun 2007 17:55:31 +0000
parents 90bf48c74714
children a63812008056
files babel/util.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/babel/util.py
+++ b/babel/util.py
@@ -123,11 +123,11 @@
     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
Copyright (C) 2012-2017 Edgewall Software