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
c8e75ba2
Kaydet (Commit)
c8e75ba2
authored
Şub 18, 2013
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Disable posixpath.realpath() tests on Windows (fix for issue #6975).
üst
46764489
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
test_posixpath.py
Lib/test/test_posixpath.py
+12
-0
No files found.
Lib/test/test_posixpath.py
Dosyayı görüntüle @
c8e75ba2
...
...
@@ -9,6 +9,16 @@ from posixpath import realpath, abspath, dirname, basename
ABSTFN
=
abspath
(
test_support
.
TESTFN
)
def
skip_if_ABSTFN_contains_backslash
(
test
):
"""
On Windows, posixpath.abspath still returns paths with backslashes
instead of posix forward slashes. If this is the case, several tests
fail, so skip them.
"""
found_backslash
=
'
\\
'
in
ABSTFN
msg
=
"ABSTFN is not a posix path - tests fail"
return
[
test
,
unittest
.
skip
(
msg
)(
test
)][
found_backslash
]
def
safe_rmdir
(
dirname
):
try
:
os
.
rmdir
(
dirname
)
...
...
@@ -214,11 +224,13 @@ class PosixPathTest(unittest.TestCase):
self
.
assertEqual
(
posixpath
.
normpath
(
"///foo/.//bar//.//..//.//baz"
),
"/foo/baz"
)
self
.
assertEqual
(
posixpath
.
normpath
(
"///..//./foo/.//bar"
),
"/foo/bar"
)
@skip_if_ABSTFN_contains_backslash
def
test_realpath_curdir
(
self
):
self
.
assertEqual
(
realpath
(
'.'
),
os
.
getcwd
())
self
.
assertEqual
(
realpath
(
'./.'
),
os
.
getcwd
())
self
.
assertEqual
(
realpath
(
'/'
.
join
([
'.'
]
*
100
)),
os
.
getcwd
())
@skip_if_ABSTFN_contains_backslash
def
test_realpath_pardir
(
self
):
self
.
assertEqual
(
realpath
(
'..'
),
dirname
(
os
.
getcwd
()))
self
.
assertEqual
(
realpath
(
'../..'
),
dirname
(
dirname
(
os
.
getcwd
())))
...
...
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