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
44a46329
Commit
44a46329
authored
Nov 07, 2011
by
Florent Xicluna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some win32 platforms raise NotADirectoryError, others FileNotFoundError. Issue #13366.
parent
6fc5b731
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Lib/test/test_pep277.py
Lib/test/test_pep277.py
+3
-3
No files found.
Lib/test/test_pep277.py
View file @
44a46329
...
...
@@ -99,7 +99,7 @@ class UnicodeFileTests(unittest.TestCase):
# listdir may append a wildcard to the filename
if
fn
is
os
.
listdir
and
sys
.
platform
==
'win32'
:
exc_filename
,
_
,
wildcard
=
exc_filename
.
rpartition
(
os
.
sep
)
self
.
assertEqual
(
wildcard
,
r
'*.*'
)
self
.
assertEqual
(
wildcard
,
'*.*'
)
if
check_filename
:
self
.
assertEqual
(
exc_filename
,
filename
,
"Function '%s(%a) failed "
"with bad filename in the exception: %a"
%
...
...
@@ -117,7 +117,8 @@ class UnicodeFileTests(unittest.TestCase):
self
.
_apply_failure
(
os
.
listdir
,
name
)
if
sys
.
platform
==
'win32'
:
_listdir_failure
=
FileNotFoundError
# Windows is lunatic. Issue #13366.
_listdir_failure
=
NotADirectoryError
,
FileNotFoundError
else
:
_listdir_failure
=
NotADirectoryError
...
...
@@ -146,7 +147,6 @@ class UnicodeFileTests(unittest.TestCase):
self
.
_apply_failure
(
os
.
chdir
,
name
)
self
.
_apply_failure
(
os
.
rmdir
,
name
)
self
.
_apply_failure
(
os
.
remove
,
name
)
# listdir may append a wildcard to the filename, so dont check
self
.
_apply_failure
(
os
.
listdir
,
name
)
# Skip the test on darwin, because darwin uses a normalization different
...
...
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