diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2013-10-24 04:50:56 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2013-10-24 04:50:56 (GMT) |
commit | b82a3dc2409e68dbd20d1991ba2e9d1c490c67a3 (patch) | |
tree | 21fd3e79db0e547e2fe5a62a933db0ecc79dd2a5 /Lib/macurl2path.py | |
parent | a1782e1be87bc6cffbf5e1b4e74e1b2456d087d4 (diff) | |
download | cpython-b82a3dc2409e68dbd20d1991ba2e9d1c490c67a3.zip cpython-b82a3dc2409e68dbd20d1991ba2e9d1c490c67a3.tar.gz cpython-b82a3dc2409e68dbd20d1991ba2e9d1c490c67a3.tar.bz2 |
Increase the coverage of macurl2path. Patch by Colin Williams.
Diffstat (limited to 'Lib/macurl2path.py')
-rw-r--r-- | Lib/macurl2path.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/Lib/macurl2path.py b/Lib/macurl2path.py index f22fb20..a68821d 100644 --- a/Lib/macurl2path.py +++ b/Lib/macurl2path.py @@ -75,23 +75,3 @@ def pathname2url(pathname): def _pncomp2url(component): # We want to quote slashes return urllib.parse.quote(component[:31], safe='') - -def test(): - for url in ["index.html", - "bar/index.html", - "/foo/bar/index.html", - "/foo/bar/", - "/"]: - print('%r -> %r' % (url, url2pathname(url))) - for path in ["drive:", - "drive:dir:", - "drive:dir:file", - "drive:file", - "file", - ":file", - ":dir:", - ":dir:file"]: - print('%r -> %r' % (path, pathname2url(path))) - -if __name__ == '__main__': - test() |