Show More
@@ -1708,7 +1708,8 b' class url(object):' | |||||
1708 | # letters to paths with drive letters. |
|
1708 | # letters to paths with drive letters. | |
1709 | if hasdriveletter(self._hostport): |
|
1709 | if hasdriveletter(self._hostport): | |
1710 | path = self._hostport + '/' + self.path |
|
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 | path = '/' + path |
|
1713 | path = '/' + path | |
1713 | return path |
|
1714 | return path | |
1714 | return self._origpath |
|
1715 | return self._origpath |
@@ -223,6 +223,14 b' def test_url():' | |||||
223 | >>> u.localpath() |
|
223 | >>> u.localpath() | |
224 | 'f:oo/bar/baz' |
|
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 | >>> u = url('file:foo/bar/baz') |
|
234 | >>> u = url('file:foo/bar/baz') | |
227 | >>> u |
|
235 | >>> u | |
228 | <url scheme: 'file', path: 'foo/bar/baz'> |
|
236 | <url scheme: 'file', path: 'foo/bar/baz'> |
General Comments 0
You need to be logged in to leave comments.
Login now