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
5758fa78
Commit
5758fa78
authored
May 28, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
Issue #17746: Skip test_shutil.test_non_matching_mode when run as root or
on unsuitable platform/environment.
parents
5cc9d32e
12516e2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
Lib/test/test_shutil.py
Lib/test/test_shutil.py
+4
-0
No files found.
Lib/test/test_shutil.py
View file @
5758fa78
...
...
@@ -1338,9 +1338,13 @@ class TestWhich(unittest.TestCase):
# Other platforms: shouldn't match in the current directory.
self
.
assertIsNone
(
rv
)
@
unittest
.
skipIf
(
hasattr
(
os
,
'geteuid'
)
and
os
.
geteuid
()
==
0
,
'non-root user required'
)
def
test_non_matching_mode
(
self
):
# Set the file read-only and ask for writeable files.
os
.
chmod
(
self
.
temp_file
.
name
,
stat
.
S_IREAD
)
if
os
.
access
(
self
.
temp_file
.
name
,
os
.
W_OK
):
self
.
skipTest
(
"can't set the file read-only"
)
rv
=
shutil
.
which
(
self
.
file
,
path
=
self
.
dir
,
mode
=
os
.
W_OK
)
self
.
assertIsNone
(
rv
)
...
...
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