8000 Minor spell fix and formatting fixes in urllib tests. (#959) · xiaolanpython/cpython@efbd4ea · GitHub
[go: up one dir, main page]

Skip to content

Commit efbd4ea

Browse files
authored
Minor spell fix and formatting fixes in urllib tests. (python#959)
1 parent 11fa3c7 commit efbd4ea

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:
@@ -476,6 +478,7 @@ def test_cafile_and_context(self):
476478
"https://localhost", cafile="/nonexistent/path", context=context
477479
)
478480

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

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

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

Lib/test/test_urllibnet.py

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

3030

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

0 commit comments

Comments
 (0)
0