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
b03c2c51
Commit
b03c2c51
authored
Sep 06, 2018
by
Zackery Spytz
Committed by
Benjamin Peterson
Sep 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
closes bpo-34594: Don't hardcode errno values in the tests. (GH-9076)
parent
3e2b29dc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
Lib/test/test_spwd.py
Lib/test/test_spwd.py
+0
-2
Lib/test/test_tabnanny.py
Lib/test/test_tabnanny.py
+3
-1
Misc/NEWS.d/next/Tests/2018-09-05-23-50-21.bpo-34594.tqL-GS.rst
...EWS.d/next/Tests/2018-09-05-23-50-21.bpo-34594.tqL-GS.rst
+1
-0
No files found.
Lib/test/test_spwd.py
View file @
b03c2c51
...
...
@@ -67,8 +67,6 @@ class TestSpwdNonRoot(unittest.TestCase):
spwd
.
getspnam
(
name
)
except
KeyError
as
exc
:
self
.
skipTest
(
"spwd entry %r doesn't exist: %s"
%
(
name
,
exc
))
else
:
self
.
assertEqual
(
str
(
cm
.
exception
),
'[Errno 13] Permission denied'
)
if
__name__
==
"__main__"
:
...
...
Lib/test/test_tabnanny.py
View file @
b03c2c51
...
...
@@ -5,6 +5,7 @@ Glossary:
"""
from
unittest
import
TestCase
,
mock
from
unittest
import
mock
import
errno
import
tabnanny
import
tokenize
import
tempfile
...
...
@@ -232,7 +233,8 @@ class TestCheck(TestCase):
def
test_when_no_file
(
self
):
"""A python file which does not exist actually in system."""
path
=
'no_file.py'
err
=
f"
{
path
!
r
}
: I/O Error: [Errno 2] No such file or directory:
{
path
!
r
}\
n
"
err
=
f"
{
path
!
r
}
: I/O Error: [Errno
{
errno
.
ENOENT
}
] "
\
f"No such file or directory:
{
path
!
r
}\
n
"
self
.
verify_tabnanny_check
(
path
,
err
=
err
)
def
test_errored_directory
(
self
):
...
...
Misc/NEWS.d/next/Tests/2018-09-05-23-50-21.bpo-34594.tqL-GS.rst
0 → 100644
View file @
b03c2c51
Fix usage of hardcoded ``errno`` values in the tests.
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