Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
efbd4ea6
Commit
efbd4ea6
authored
Apr 01, 2017
by
Senthil Kumaran
Committed by
GitHub
Apr 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor spell fix and formatting fixes in urllib tests. (#959)
parent
11fa3c7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
Lib/test/test_urllib.py
Lib/test/test_urllib.py
+5
-1
Lib/test/test_urllibnet.py
Lib/test/test_urllibnet.py
+1
-1
No files found.
Lib/test/test_urllib.py
View file @
efbd4ea6
...
...
@@ -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
\
n
Hello!"
)
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"""
...
...
Lib/test/test_urllibnet.py
View file @
efbd4ea6
...
...
@@ -29,7 +29,7 @@ class URLTimeoutTest(unittest.TestCase):
class
urlopenNetworkTests
(
unittest
.
TestCase
):
"""Tests urllib.reqest.urlopen using the network.
"""Tests urllib.req
u
est.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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment