Show More
@@ -1708,7 +1708,8 b' class url(object):' | |||
|
1708 | 1708 | # letters to paths with drive letters. |
|
1709 | 1709 | if hasdriveletter(self._hostport): |
|
1710 | 1710 | path = self._hostport + '/' + self.path |
|
1711 |
elif self.host is not None and self.path |
|
|
1711 | elif (self.host is not None and self.path | |
|
1712 | and not hasdriveletter(path)): | |
|
1712 | 1713 | path = '/' + path |
|
1713 | 1714 | return path |
|
1714 | 1715 | return self._origpath |
@@ -223,6 +223,14 b' def test_url():' | |||
|
223 | 223 | >>> u.localpath() |
|
224 | 224 | 'f:oo/bar/baz' |
|
225 | 225 | |
|
226 | >>> u = url('file://localhost/f:oo/bar/baz') | |
|
227 | >>> u | |
|
228 | <url scheme: 'file', host: 'localhost', path: 'f:oo/bar/baz'> | |
|
229 | >>> str(u) | |
|
230 | 'file://localhost/f%3Aoo/bar/baz' | |
|
231 | >>> u.localpath() | |
|
232 | 'f:oo/bar/baz' | |
|
233 | ||
|
226 | 234 | >>> u = url('file:foo/bar/baz') |
|
227 | 235 | >>> u |
|
228 | 236 | <url scheme: 'file', path: 'foo/bar/baz'> |
General Comments 0
You need to be logged in to leave comments.
Login now