]> granicus.if.org Git - python/commitdiff
Minor spell fix and formatting fixes in urllib tests. (#959) (#961)
authorSenthil Kumaran <skumaran@gatech.edu>
Sun, 2 Apr 2017 08:36:58 +0000 (01:36 -0700)
committerGitHub <noreply@github.com>
Sun, 2 Apr 2017 08:36:58 +0000 (01:36 -0700)
(cherry picked from commit efbd4ea65dbb9f87b1afeec6a760802756badee5)

Lib/test/test_urllib.py
Lib/test/test_urllibnet.py

index 5084486e5ab4798f9f640f7c9102fbbfa7fc7d9e..fa3757cc94be52f68bea978bd84bfc91dca88cfb 100644 (file)
@@ -206,6 +206,7 @@ class urlopen_FileTests(unittest.TestCase):
     def test_relativelocalfile(self):
         self.assertRaises(ValueError,urllib.request.urlopen,'./' + self.pathname)
 
+
 class ProxyTests(unittest.TestCase):
 
     def setUp(self):
@@ -259,6 +260,7 @@ class ProxyTests(unittest.TestCase):
         self.assertFalse(bypass('newdomain.com'))            # no port
         self.assertFalse(bypass('newdomain.com:1235'))       # wrong port
 
+
 class ProxyTests_withOrderedEnv(unittest.TestCase):
 
     def setUp(self):
@@ -294,6 +296,7 @@ class ProxyTests_withOrderedEnv(unittest.TestCase):
         proxies = urllib.request.getproxies_environment()
         self.assertEqual('http://somewhere:3128', proxies['http'])
 
+
 class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin):
     """Test urlopen() opening a fake http connection."""
 
@@ -432,7 +435,6 @@ Connection: close
         finally:
             self.unfakeftp()
 
-
     def test_userpass_inurl(self):
         self.fakehttp(b"HTTP/1.0 200 OK\r\n\r\nHello!")
         try:
@@ -476,6 +478,7 @@ Connection: close
                     "https://localhost", cafile="/nonexistent/path", context=context
                 )
 
+
 class urlopen_DataTests(unittest.TestCase):
     """Test urlopen() opening a data URL."""
 
@@ -549,6 +552,7 @@ class urlopen_DataTests(unittest.TestCase):
         # missing padding character
         self.assertRaises(ValueError,urllib.request.urlopen,'data:;base64,Cg=')
 
+
 class urlretrieve_FileTests(unittest.TestCase):
     """Test urllib.urlretrieve() on local files"""
 
index 949716c2b567e0008ba25266aea0060b1a2dc3fb..865a7f4f5fb172e9240ad1e2fdb5b9df89c47fef 100644 (file)
@@ -29,7 +29,7 @@ class URLTimeoutTest(unittest.TestCase):
 
 
 class urlopenNetworkTests(unittest.TestCase):
-    """Tests urllib.reqest.urlopen using the network.
+    """Tests urllib.request.urlopen using the network.
 
     These tests are not exhaustive.  Assuming that testing using files does a
     good job overall of some of the basic interface features.  There are no