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
6b490b5d
Commit
6b490b5d
authored
Jul 10, 2018
by
Bradley Laney
Committed by
Tal Einat
Jul 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091)
Contributed by Bradley Laney.
parent
5ac9e6ee
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
Lib/test/test_file.py
Lib/test/test_file.py
+1
-2
Lib/test/test_urllib2_localnet.py
Lib/test/test_urllib2_localnet.py
+1
-1
No files found.
Lib/test/test_file.py
View file @
6b490b5d
...
...
@@ -241,8 +241,7 @@ class OtherFileTests:
# Test for appropriate errors mixing read* and iteration
for
methodname
,
args
in
methods
:
f
=
self
.
open
(
TESTFN
,
'rb'
)
if
next
(
f
)
!=
filler
:
self
.
fail
,
"Broken testfile"
self
.
assertEqual
(
next
(
f
),
filler
)
meth
=
getattr
(
f
,
methodname
)
meth
(
*
args
)
# This simply shouldn't fail
f
.
close
()
...
...
Lib/test/test_urllib2_localnet.py
View file @
6b490b5d
...
...
@@ -306,7 +306,7 @@ class BasicAuthTests(unittest.TestCase):
try
:
self
.
assertTrue
(
urllib
.
request
.
urlopen
(
self
.
server_url
))
except
urllib
.
error
.
HTTPError
:
self
.
fail
(
"Basic auth failed for the url: %s"
,
self
.
server_url
)
self
.
fail
(
"Basic auth failed for the url: %s"
%
self
.
server_url
)
def
test_basic_auth_httperror
(
self
):
ah
=
urllib
.
request
.
HTTPBasicAuthHandler
()
...
...
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