[Python-checkins] python/dist/src/Lib/test test_httplib.py, 1.13, 1.14

montanaro at users.sourceforge.net montanaro at users.sourceforge.net
Tue Sep 14 18:32:05 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26872/Lib/test

Modified Files:
	test_httplib.py 
Log Message:
Search from the end of the host/port combination to find the colon which
separates ip address from the port to accommodate ipv6 addresses.


Index: test_httplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_httplib.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- test_httplib.py	7 Aug 2004 16:28:14 -0000	1.13
+++ test_httplib.py	14 Sep 2004 16:32:02 -0000	1.14
@@ -118,6 +118,13 @@
         else:
             print "Expect InvalidURL"
 
+    for hp in ("[fe80::207:e9ff:fe9b]:8000", "www.python.org:80",
+               "www.python.org"):
+        try:
+            h = httplib.HTTP(hp)
+        except httplib.InvalidURL:
+            print "InvalidURL raised erroneously"
+
     # test response with multiple message headers with the same field name.
     text = ('HTTP/1.1 200 OK\r\n'
             'Set-Cookie: Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"\r\n'



More information about the Python-checkins mailing list