mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
add test of InvalidURL
This commit is contained in:
parent
9d38997e8c
commit
03ff86da25
1 changed files with 10 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue