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
5cc9a052
Commit
5cc9a052
authored
Sep 19, 2010
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the test_distutils mode test to test with umask value properly.
parent
eb19dce0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
Lib/distutils/tests/test_dir_util.py
Lib/distutils/tests/test_dir_util.py
+7
-2
No files found.
Lib/distutils/tests/test_dir_util.py
View file @
5cc9a052
...
...
@@ -53,10 +53,15 @@ class DirUtilTestCase(support.TempdirManager, unittest.TestCase):
@
unittest
.
skipIf
(
sys
.
platform
.
startswith
(
'win'
),
"This test is only appropriate for POSIX-like systems."
)
def
test_mkpath_with_custom_mode
(
self
):
# Get and set the current umask value for testing mode bits.
umask
=
os
.
umask
(
0o002
)
os
.
umask
(
umask
)
mkpath
(
self
.
target
,
0o700
)
self
.
assertEqual
(
stat
.
S_IMODE
(
os
.
stat
(
self
.
target
).
st_mode
),
0o700
)
self
.
assertEqual
(
stat
.
S_IMODE
(
os
.
stat
(
self
.
target
).
st_mode
),
0o700
&
~
umask
)
mkpath
(
self
.
target2
,
0o555
)
self
.
assertEqual
(
stat
.
S_IMODE
(
os
.
stat
(
self
.
target2
).
st_mode
),
0o555
)
self
.
assertEqual
(
stat
.
S_IMODE
(
os
.
stat
(
self
.
target2
).
st_mode
),
0o555
&
~
umask
)
def
test_create_tree_verbosity
(
self
):
...
...
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