mirror of
https://github.com/python/cpython.git
synced 2025-09-24 17:33:29 +00:00
Issue2987 - Added additional Invalid URL and changed the Invalid URL checking code for better.
This commit is contained in:
parent
c166b4021f
commit
241a04371b
2 changed files with 9 additions and 6 deletions
|
@ -272,6 +272,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 : urlparse.urlparse(invalid_url).hostname)
|
||||
self.assertRaises(ValueError, lambda : urlparse.urlparse(invalid_url))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue