Skip to content

Minor spell fix and formatting fixes in urllib tests. (#959) #961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Lib/test/test_urllib.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def test_iter(self):
def test_relativelocalfile(self):
self.assertRaises(ValueError,urllib.request.urlopen,'./' + self.pathname)


class ProxyTests(unittest.TestCase):

def setUp(self):
Expand Down Expand Up @@ -259,6 +260,7 @@ def test_proxy_bypass_environment_host_match(self):
self.assertFalse(bypass('newdomain.com')) # no port
self.assertFalse(bypass('newdomain.com:1235')) # wrong port


class ProxyTests_withOrderedEnv(unittest.TestCase):

def setUp(self):
Expand Down Expand Up @@ -294,6 +296,7 @@ def test_getproxies_environment_prefer_lowercase(self):
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."""

Expand Down Expand Up @@ -432,7 +435,6 @@ def test_ftp_cache_pruning(self):
finally:
self.unfakeftp()


def test_userpass_inurl(self):
self.fakehttp(b"HTTP/1.0 200 OK\r\n\r\nHello!")
try:
Expand Down Expand Up @@ -476,6 +478,7 @@ def test_cafile_and_context(self):
"https://localhost", cafile="/nonexistent/path", context=context
)


class urlopen_DataTests(unittest.TestCase):
"""Test urlopen() opening a data URL."""

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


class urlretrieve_FileTests(unittest.TestCase):
"""Test urllib.urlretrieve() on local files"""

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_urllibnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def testURLread(self):


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
Expand Down