diff options
author | Senthil Kumaran <skumaran@gatech.edu> | 2017-04-02 08:37:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-02 08:37:04 (GMT) |
commit | 9881e02d690fd9638b7dff959640db51d297d151 (patch) | |
tree | a53c0f9f6da9fe536e00743df4b2ecbf0da06693 | |
parent | 553275d125478a6563dde7523f4f28c92f1861b4 (diff) | |
download | cpython-9881e02d690fd9638b7dff959640db51d297d151.zip cpython-9881e02d690fd9638b7dff959640db51d297d151.tar.gz cpython-9881e02d690fd9638b7dff959640db51d297d151.tar.bz2 |
Minor spell fix and formatting fixes in urllib tests. (#959) (#960)
(cherry picked from commit efbd4ea65dbb9f87b1afeec6a760802756badee5)
-rw-r--r-- | Lib/test/test_urllib.py | 6 | ||||
-rw-r--r-- | Lib/test/test_urllibnet.py | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 1772399..1a28c9a 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -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: @@ -475,6 +477,7 @@ Connection: close "https://localhost", cafile="/nonexistent/path", context=context ) + class urlopen_DataTests(unittest.TestCase): """Test urlopen() opening a data URL.""" @@ -548,6 +551,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""" diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py index b811930..8379f1a 100644 --- a/Lib/test/test_urllibnet.py +++ b/Lib/test/test_urllibnet.py @@ -30,7 +30,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 |