Skip to content

Commit 9881e02

Browse files
authored
Minor spell fix and formatting fixes in urllib tests. (#959) (#960)
(cherry picked from commit efbd4ea)
1 parent 553275d commit 9881e02

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Lib/test/test_urllib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ def test_iter(self):
206206
def test_relativelocalfile(self):
207207
self.assertRaises(ValueError,urllib.request.urlopen,'./' + self.pathname)
208208

209+
209210
class ProxyTests(unittest.TestCase):
210211

211212
def setUp(self):
@@ -259,6 +260,7 @@ def test_proxy_bypass_environment_host_match(self):
259260
self.assertFalse(bypass('newdomain.com')) # no port
260261
self.assertFalse(bypass('newdomain.com:1235')) # wrong port
261262

263+
262264
class ProxyTests_withOrderedEnv(unittest.TestCase):
263265

264266
def setUp(self):
@@ -294,6 +296,7 @@ def test_getproxies_environment_prefer_lowercase(self):
294296
proxies = urllib.request.getproxies_environment()
295297
self.assertEqual('http://somewhere:3128', proxies['http'])
296298

299+
297300
class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin):
298301
"""Test urlopen() opening a fake http connection."""
299302

@@ -432,7 +435,6 @@ def test_ftp_cache_pruning(self):
432435
finally:
433436
self.unfakeftp()
434437

435-
436438
def test_userpass_inurl(self):
437439
self.fakehttp(b"HTTP/1.0 200 OK\r\n\r\nHello!")
438440
try:
@@ -475,6 +477,7 @@ def test_cafile_and_context(self):
475477
"https://localhost", cafile="/nonexistent/path", context=context
476478
)
477479

480+
478481
class urlopen_DataTests(unittest.TestCase):
479482
"""Test urlopen() opening a data URL."""
480483

@@ -548,6 +551,7 @@ def test_invalid_base64_data(self):
548551
# missing padding character
549552
self.assertRaises(ValueError,urllib.request.urlopen,'data:;base64,Cg=')
550553

554+
551555
class urlretrieve_FileTests(unittest.TestCase):
552556
"""Test urllib.urlretrieve() on local files"""
553557

Lib/test/test_urllibnet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def testURLread(self):
3030

3131

3232
class urlopenNetworkTests(unittest.TestCase):
33-
"""Tests urllib.reqest.urlopen using the network.
33+
"""Tests urllib.request.urlopen using the network.
3434
3535
These tests are not exhaustive. Assuming that testing using files does a
3636
good job overall of some of the basic interface features. There are no

0 commit comments

Comments
 (0)