Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
9b86a69f
Kaydet (Commit)
9b86a69f
authored
Eyl 17, 2010
tarafından
Senthil Kumaran
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix Issue2236: Distutils' mkpath implementation ignoring the "mode" parameter
üst
ac00799d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
dir_util.py
Lib/distutils/dir_util.py
+1
-1
test_dir_util.py
Lib/distutils/tests/test_dir_util.py
+7
-0
No files found.
Lib/distutils/dir_util.py
Dosyayı görüntüle @
9b86a69f
...
...
@@ -68,7 +68,7 @@ def mkpath(name, mode=0o777, verbose=1, dry_run=0):
if
not
dry_run
:
try
:
os
.
mkdir
(
head
)
os
.
mkdir
(
head
,
mode
)
created_dirs
.
append
(
head
)
except
OSError
as
exc
:
raise
DistutilsFileError
(
...
...
Lib/distutils/tests/test_dir_util.py
Dosyayı görüntüle @
9b86a69f
"""Tests for distutils.dir_util."""
import
unittest
import
os
import
stat
import
shutil
from
distutils.dir_util
import
(
mkpath
,
remove_tree
,
create_tree
,
copy_tree
,
...
...
@@ -48,6 +49,12 @@ class DirUtilTestCase(support.TempdirManager, unittest.TestCase):
wanted
=
[
"removing '
%
s' (and everything under it)"
%
self
.
root_target
]
self
.
assertEquals
(
self
.
_logs
,
wanted
)
def
test_mkpath_with_custom_mode
(
self
):
mkpath
(
self
.
target
,
0
o700
)
self
.
assertEqual
(
stat
.
S_IMODE
(
os
.
stat
(
self
.
target
)
.
st_mode
),
0
o700
)
mkpath
(
self
.
target2
,
0
o555
)
self
.
assertEqual
(
stat
.
S_IMODE
(
os
.
stat
(
self
.
target2
)
.
st_mode
),
0
o555
)
def
test_create_tree_verbosity
(
self
):
create_tree
(
self
.
root_target
,
[
'one'
,
'two'
,
'three'
],
verbose
=
0
)
...
...
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