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
e430073f
Kaydet (Commit)
e430073f
authored
Eyl 27, 2014
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #9850: Fixed macpath.join() for empty first component. Patch by
Oleg Oshmyan.
üst
6e7c1401
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
macpath.py
Lib/macpath.py
+1
-1
test_macpath.py
Lib/test/test_macpath.py
+20
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/macpath.py
Dosyayı görüntüle @
e430073f
...
@@ -42,7 +42,7 @@ def isabs(s):
...
@@ -42,7 +42,7 @@ def isabs(s):
def
join
(
s
,
*
p
):
def
join
(
s
,
*
p
):
path
=
s
path
=
s
for
t
in
p
:
for
t
in
p
:
if
(
not
s
)
or
isabs
(
t
):
if
(
not
path
)
or
isabs
(
t
):
path
=
t
path
=
t
continue
continue
if
t
[:
1
]
==
':'
:
if
t
[:
1
]
==
':'
:
...
...
Lib/test/test_macpath.py
Dosyayı görüntüle @
e430073f
...
@@ -29,6 +29,26 @@ class MacPathTestCase(unittest.TestCase):
...
@@ -29,6 +29,26 @@ class MacPathTestCase(unittest.TestCase):
self
.
assertEqual
(
split
(
":conky:mountpoint:"
),
self
.
assertEqual
(
split
(
":conky:mountpoint:"
),
(
':conky:mountpoint'
,
''
))
(
':conky:mountpoint'
,
''
))
def
test_join
(
self
):
join
=
macpath
.
join
self
.
assertEqual
(
join
(
'a'
,
'b'
),
':a:b'
)
self
.
assertEqual
(
join
(
':a'
,
'b'
),
':a:b'
)
self
.
assertEqual
(
join
(
':a:'
,
'b'
),
':a:b'
)
self
.
assertEqual
(
join
(
':a::'
,
'b'
),
':a::b'
)
self
.
assertEqual
(
join
(
':a'
,
'::b'
),
':a::b'
)
self
.
assertEqual
(
join
(
'a'
,
':'
),
':a:'
)
self
.
assertEqual
(
join
(
'a:'
,
':'
),
'a:'
)
self
.
assertEqual
(
join
(
'a'
,
''
),
':a:'
)
self
.
assertEqual
(
join
(
'a:'
,
''
),
'a:'
)
self
.
assertEqual
(
join
(
''
,
''
),
''
)
self
.
assertEqual
(
join
(
''
,
'a:b'
),
'a:b'
)
self
.
assertEqual
(
join
(
''
,
'a'
,
'b'
),
':a:b'
)
self
.
assertEqual
(
join
(
'a:b'
,
'c'
),
'a:b:c'
)
self
.
assertEqual
(
join
(
'a:b'
,
':c'
),
'a:b:c'
)
self
.
assertEqual
(
join
(
'a'
,
':b'
,
':c'
),
':a:b:c'
)
self
.
assertEqual
(
join
(
'a'
,
'b:'
),
'b:'
)
self
.
assertEqual
(
join
(
'a:'
,
'b:'
),
'b:'
)
def
test_splitext
(
self
):
def
test_splitext
(
self
):
splitext
=
macpath
.
splitext
splitext
=
macpath
.
splitext
self
.
assertEqual
(
splitext
(
":foo.ext"
),
(
':foo'
,
'.ext'
))
self
.
assertEqual
(
splitext
(
":foo.ext"
),
(
':foo'
,
'.ext'
))
...
...
Misc/NEWS
Dosyayı görüntüle @
e430073f
...
@@ -22,6 +22,9 @@ Core and Builtins
...
@@ -22,6 +22,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #9850: Fixed macpath.join() for empty first component. Patch by
Oleg Oshmyan.
- Issue #20912: Now directories added to ZIP file have correct Unix and MS-DOS
- Issue #20912: Now directories added to ZIP file have correct Unix and MS-DOS
directory attributes.
directory attributes.
...
...
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