[Python-checkins] r67441 - python/trunk/Lib/test/test_httplib.py

jeremy.hylton python-checkins at python.org
Sat Nov 29 01:09:16 CET 2008


Author: jeremy.hylton
Date: Sat Nov 29 01:09:16 2008
New Revision: 67441

Log:
Reflow long lines.


Modified:
   python/trunk/Lib/test/test_httplib.py

Modified: python/trunk/Lib/test/test_httplib.py
==============================================================================
--- python/trunk/Lib/test/test_httplib.py	(original)
+++ python/trunk/Lib/test/test_httplib.py	Sat Nov 29 01:09:16 2008
@@ -107,19 +107,23 @@
         for hp in ("www.python.org:abc", "www.python.org:"):
             self.assertRaises(httplib.InvalidURL, httplib.HTTP, hp)
 
-        for hp, h, p in (("[fe80::207:e9ff:fe9b]:8000", "fe80::207:e9ff:fe9b", 8000),
+        for hp, h, p in (("[fe80::207:e9ff:fe9b]:8000", "fe80::207:e9ff:fe9b",
+                          8000),
                          ("www.python.org:80", "www.python.org", 80),
                          ("www.python.org", "www.python.org", 80),
                          ("[fe80::207:e9ff:fe9b]", "fe80::207:e9ff:fe9b", 80)):
             http = httplib.HTTP(hp)
             c = http._conn
-            if h != c.host: self.fail("Host incorrectly parsed: %s != %s" % (h, c.host))
-            if p != c.port: self.fail("Port incorrectly parsed: %s != %s" % (p, c.host))
+            if h != c.host:
+                self.fail("Host incorrectly parsed: %s != %s" % (h, c.host))
+            if p != c.port:
+                self.fail("Port incorrectly parsed: %s != %s" % (p, c.host))
 
     def test_response_headers(self):
         # 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'
+                'Set-Cookie: Customer="WILE_E_COYOTE";'
+                ' Version="1"; Path="/acme"\r\n'
                 'Set-Cookie: Part_Number="Rocket_Launcher_0001"; Version="1";'
                 ' Path="/acme"\r\n'
                 '\r\n'
@@ -187,7 +191,8 @@
                 resp.close()
 
     def test_negative_content_length(self):
-        sock = FakeSocket('HTTP/1.1 200 OK\r\nContent-Length: -1\r\n\r\nHello\r\n')
+        sock = FakeSocket('HTTP/1.1 200 OK\r\n'
+                          'Content-Length: -1\r\n\r\nHello\r\n')
         resp = httplib.HTTPResponse(sock, method="GET")
         resp.begin()
         self.assertEquals(resp.read(), 'Hello\r\n')


More information about the Python-checkins mailing list