Merged revisions 80277 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80277 | senthil.kumaran | 2010-04-21 02:07:59 +0530 (Wed, 21 Apr 2010) | 3 lines

  Issue2987 - Added additional Invalid URL and changed the Invalid URL checking code for better.
........
This commit is contained in:
Senthil Kumaran 2010-04-20 20:42:50 +00:00
parent 712979d292
commit 2eaef05c47
2 changed files with 9 additions and 6 deletions

View file

@ -273,6 +273,7 @@ class UrlParseTestCase(unittest.TestCase):
for invalid_url in [
'http://::12.34.56.78]/',
'http://[::1/foo/',
'http://[::1/foo/bad]/bad',
'http://[::ffff:12.34.56.78']:
self.assertRaises(ValueError, lambda : urllib.parse.urlparse(invalid_url).hostname)
self.assertRaises(ValueError, lambda : urllib.parse.urlparse(invalid_url))