diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-04-09 11:49:36 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-02 15:41:31 +0100 |
commit | a21841fb75c13d111b3039a4227e92c03ade8cbe (patch) | |
tree | 2fd8cf45730e1445b3490cdbb3e1ecd22271e34c | |
parent | ca9a956abc6b9b20bc7616c9e9bb2341be2bf5bb (diff) | |
download | poky-a21841fb75c13d111b3039a4227e92c03ade8cbe.tar.gz |
Drop doctest, as we aren't utilizing it
We should add back in some proper unit testing. Doctest is rather limited,
and we haven't actually made use of it since the original implementation of
the datastore when the project started, as far as I'm aware.
(Bitbake rev: 3a11c2807972bbbddffde2fa67fc380d159da467)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index b566da4311..15292c6b7b 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
@@ -53,24 +53,6 @@ class InvalidSRCREV(Exception): | |||
53 | def decodeurl(url): | 53 | def decodeurl(url): |
54 | """Decodes an URL into the tokens (scheme, network location, path, | 54 | """Decodes an URL into the tokens (scheme, network location, path, |
55 | user, password, parameters). | 55 | user, password, parameters). |
56 | |||
57 | >>> decodeurl("http://www.google.com/index.html") | ||
58 | ('http', 'www.google.com', '/index.html', '', '', {}) | ||
59 | |||
60 | >>> decodeurl("file://gas/COPYING") | ||
61 | ('file', '', 'gas/COPYING', '', '', {}) | ||
62 | |||
63 | CVS url with username, host and cvsroot. The cvs module to check out is in the | ||
64 | parameters: | ||
65 | |||
66 | >>> decodeurl("cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg") | ||
67 | ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', '', {'module': 'familiar/dist/ipkg'}) | ||
68 | |||
69 | Dito, but this time the username has a password part. And we also request a special tag | ||
70 | to check out. | ||
71 | |||
72 | >>> decodeurl("cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;module=familiar/dist/ipkg;tag=V0-99-81") | ||
73 | ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', {'tag': 'V0-99-81', 'module': 'familiar/dist/ipkg'}) | ||
74 | """ | 56 | """ |
75 | 57 | ||
76 | m = re.compile('(?P<type>[^:]*)://((?P<user>.+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url) | 58 | m = re.compile('(?P<type>[^:]*)://((?P<user>.+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url) |
@@ -111,21 +93,6 @@ def decodeurl(url): | |||
111 | def encodeurl(decoded): | 93 | def encodeurl(decoded): |
112 | """Encodes a URL from tokens (scheme, network location, path, | 94 | """Encodes a URL from tokens (scheme, network location, path, |
113 | user, password, parameters). | 95 | user, password, parameters). |
114 | |||
115 | >>> encodeurl(['http', 'www.google.com', '/index.html', '', '', {}]) | ||
116 | 'http://www.google.com/index.html' | ||
117 | |||
118 | CVS with username, host and cvsroot. The cvs module to check out is in the | ||
119 | parameters: | ||
120 | |||
121 | >>> encodeurl(['cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', '', {'module': 'familiar/dist/ipkg'}]) | ||
122 | 'cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg' | ||
123 | |||
124 | Dito, but this time the username has a password part. And we also request a special tag | ||
125 | to check out. | ||
126 | |||
127 | >>> encodeurl(['cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', {'tag': 'V0-99-81', 'module': 'familiar/dist/ipkg'}]) | ||
128 | 'cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;tag=V0-99-81;module=familiar/dist/ipkg' | ||
129 | """ | 96 | """ |
130 | 97 | ||
131 | (type, host, path, user, pswd, p) = decoded | 98 | (type, host, path, user, pswd, p) = decoded |