Failing test for schemes extension

Mads Kiilerich mads at kiilerich.com
Tue Apr 6 14:17:59 CDT 2010


Michael Glassford wrote, On 04/06/2010 06:06 PM:
> 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.
>

This has also been reported on 
http://mercurial.selenic.com/bts/issue2111 , also with 2.6.5.

FWIW, on Fedora 12:

Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:45)
[GCC 4.4.2 20091222 (Red Hat 4.4.2-20)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import urlparse; urlparse.urlunparse(urlparse.urlparse("l://"))
'l://'

and Solaris

Python 2.6.4 (r264:75706, Feb 15 2010, 17:00:13) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
 >>> import urlparse; urlparse.urlunparse(urlparse.urlparse("l://"))
'l://'

Can someone confirm if this is a 2.6.5 issue?

/Mads



More information about the Mercurial-devel mailing list