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
d51ba01f
Commit
d51ba01f
authored
Oct 31, 2012
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #15478: Fix again to fix test_os on Windows
parent
62b3a45e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
Lib/test/support.py
Lib/test/support.py
+1
-1
Lib/test/test_os.py
Lib/test/test_os.py
+7
-4
No files found.
Lib/test/support.py
View file @
d51ba01f
...
...
@@ -654,7 +654,7 @@ TESTFN_UNDECODABLE = None
for
name
in
(
b'abc
\
xff
'
,
b'
\
xe7
w
\
xf0
'
):
try
:
os
.
fsdecode
(
name
)
except
UnicodeDecodeEr
or
r
:
except
UnicodeDecodeEr
ro
r
:
TESTFN_UNDECODABLE
=
name
break
...
...
Lib/test/test_os.py
View file @
d51ba01f
...
...
@@ -2069,7 +2069,6 @@ class OSErrorTests(unittest.TestCase):
funcs
=
[
(
os
.
chdir
,),
(
os
.
chmod
,
0o777
),
(
os
.
lchown
,
0
,
0
),
(
os
.
listdir
,),
(
os
.
lstat
,),
(
os
.
open
,
os
.
O_RDONLY
),
...
...
@@ -2077,15 +2076,19 @@ class OSErrorTests(unittest.TestCase):
(
os
.
replace
,
"dst"
),
(
os
.
rmdir
,),
(
os
.
stat
,),
(
os
.
truncate
,
0
),
(
os
.
unlink
,),
]
if
hasattr
(
os
,
"chown"
):
funcs
.
append
((
os
.
chown
,
0
,
0
))
if
hasattr
(
os
,
"lchown"
):
funcs
.
append
((
os
.
lchown
,
0
,
0
))
if
hasattr
(
os
,
"truncate"
):
funcs
.
append
((
os
.
truncate
,
0
))
if
sys
.
platform
==
"win32"
:
import
nt
funcs
.
extend
((
(
os
.
_getfullpathname
,),
(
os
.
_isdir
,),
(
nt
.
_getfullpathname
,),
(
nt
.
_isdir
,),
))
if
hasattr
(
os
,
"chflags"
):
funcs
.
extend
((
...
...
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