From: Christopher Lenz Date: Mon, 18 Jun 2007 17:55:31 +0000 (+0000) Subject: Make `relpath` doctest Windows-compatible. X-Git-Tag: 1.0~499 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2ecf24d3f3c72bdeaf2853fb17e6c5ae3588205;p=thirdparty%2Fbabel.git Make `relpath` doctest Windows-compatible. --- diff --git a/babel/util.py b/babel/util.py index a0eedf4e..168679de 100644 --- a/babel/util.py +++ b/babel/util.py @@ -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