[Python-checkins] CVS: python/dist/src/Lib/test test_httplib.py,1.2,1.3
Skip Montanaro
montanaro@users.sourceforge.net
Sun, 24 Mar 2002 08:54:19 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv27827
Modified Files:
test_httplib.py
Log Message:
add test of InvalidURL
Index: test_httplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_httplib.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_httplib.py 25 Sep 2001 19:29:35 -0000 1.2
--- test_httplib.py 24 Mar 2002 16:54:16 -0000 1.3
***************
*** 30,31 ****
--- 30,41 ----
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"