mirror of
https://github.com/python/cpython.git
synced 2024-12-01 13:55:45 +08:00
add test of InvalidURL
This commit is contained in:
parent
9d38997e8c
commit
03ff86da25
@ -29,3 +29,13 @@ except httplib.BadStatusLine:
|
||||
print "BadStatusLine raised as expected"
|
||||
else:
|
||||
print "Expect BadStatusLine"
|
||||
|
||||
# Check invalid host_port
|
||||
|
||||
for hp in ("www.python.org:abc", "www.python.org:"):
|
||||
try:
|
||||
h = httplib.HTTP(hp)
|
||||
except httplib.InvalidURL:
|
||||
print "InvalidURL raised as expected"
|
||||
else:
|
||||
print "Expect InvalidURL"
|
||||
|
Loading…
Reference in New Issue
Block a user