Failing test for schemes extension
Michael Glassford
glassfordmjg at gmail.com
Tue Apr 6 11:06:28 CDT 2010
When I run the Mercurial unit tests, I get a failure like the following:
$ rm -rf tmp && ./run-tests.py --local --tmpdir tmp test-schemes
ERROR: /develop/hg/hg/tests/test-schemes output changed
--- /develop/hg/hg/tests/test-schemes.out
+++ /develop/hg/hg/tests/test-schemes.err
@@ -1,5 +1,5 @@
adding a
-comparing with l://
+comparing with l:
searching for changes
no changes found
% check that {1} syntax works
!
Failed test-schemes: output changed
# Ran 1 tests, 0 skipped, 1 failed.
Environment info:
Mac OSX 10.5.8
Python 2.6.5
Mercurial 1.5+20100307
I've tracked down the reason for the failure. tests/test-schemes has
this line:
hg incoming l://
This ends up calling function incoming in mecurial/commands.py, which
has this at line 2015:
ui.status(_('comparing with %s\n') % url.hidepassword(source))
The call to url.hidepassword (which is defined in mecurial/url.py) is
what's removing the expected "//". The following snippet illustrates
this behavior:
>>> import urlparse
>>> url = "l://"
>>> scheme, netloc, path, params, query, fragment =
urlparse.urlparse(url)
>>> urlparse.urlunparse((scheme, netloc, path, params, query,
fragment))
'l:'
Is this a platform-specific issue (i.e. does urlparse/urlunparse not
remove the "//" on other platforms)? Or does the unit test fail on
other platforms also (in which case the unit test should be changed)?
As far as I can tell it's not a Python version issue, since I see the
same failure in Python 2.5.2.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100406/ad8382e2/attachment.htm>
More information about the Mercurial-devel
mailing list