summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2002-03-24 16:54:16 (GMT)
committerSkip Montanaro <skip@pobox.com>2002-03-24 16:54:16 (GMT)
commit03ff86da2543bbbad7753c930f8af7f2a783ad4d (patch)
tree2a7f7d697dd127fe075ead47e9d09489ef850831 /Lib
parent9d38997e8c4d06ec5717276590a3f1c6a88d2bb7 (diff)
downloadcpython-03ff86da2543bbbad7753c930f8af7f2a783ad4d.zip
cpython-03ff86da2543bbbad7753c930f8af7f2a783ad4d.tar.gz
cpython-03ff86da2543bbbad7753c930f8af7f2a783ad4d.tar.bz2
add test of InvalidURL
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_httplib.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py
index d39e85f..7860dd3 100644
--- a/Lib/test/test_httplib.py
+++ b/Lib/test/test_httplib.py
@@ -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"