Show More
@@ -236,7 +236,8 b" check(_verifycert({'subject': (((u'commo" | |||||
236 |
|
236 | |||
237 | def test_url(): |
|
237 | def test_url(): | |
238 | """ |
|
238 | """ | |
239 |
>>> from mercurial |
|
239 | >>> from mercurial import error, pycompat | |
|
240 | >>> from mercurial.util import forcebytestr, url | |||
240 |
|
241 | |||
241 | This tests for edge cases in url.URL's parsing algorithm. Most of |
|
242 | This tests for edge cases in url.URL's parsing algorithm. Most of | |
242 | these aren't useful for documentation purposes, so they aren't |
|
243 | these aren't useful for documentation purposes, so they aren't | |
@@ -349,10 +350,11 b' def test_url():' | |||||
349 |
|
350 | |||
350 | Non-localhost file URL: |
|
351 | Non-localhost file URL: | |
351 |
|
352 | |||
352 | >>> u = url('file://mercurial-scm.org/foo') |
|
353 | >>> try: | |
353 | Traceback (most recent call last): |
|
354 | ... u = url(b'file://mercurial-scm.org/foo') | |
354 | File "<stdin>", line 1, in ? |
|
355 | ... except error.Abort as e: | |
355 | Abort: file:// URLs can only refer to localhost |
|
356 | ... forcebytestr(e) | |
|
357 | 'file:// URLs can only refer to localhost' | |||
356 |
|
358 | |||
357 | Empty URL: |
|
359 | Empty URL: | |
358 |
|
360 |
General Comments 0
You need to be logged in to leave comments.
Login now