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
ffc1e6d4
Kaydet (Commit)
ffc1e6d4
authored
May 28, 2014
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #21493: Added test for ntpath.expanduser(). Original patch by
Claudiu Popa.
üst
47a98133
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
test_ntpath.py
Lib/test/test_ntpath.py
+35
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_ntpath.py
Dosyayı görüntüle @
ffc1e6d4
...
...
@@ -258,6 +258,41 @@ class TestNtpath(unittest.TestCase):
check
(
'
%
spam
%
bar'
,
'
%
sbar'
%
nonascii
)
check
(
'
%
{}
%
bar'
.
format
(
nonascii
),
'ham
%
sbar'
%
nonascii
)
def
test_expanduser
(
self
):
tester
(
'ntpath.expanduser("test")'
,
'test'
)
with
support
.
EnvironmentVarGuard
()
as
env
:
env
.
clear
()
tester
(
'ntpath.expanduser("~test")'
,
'~test'
)
env
[
'HOMEPATH'
]
=
'eric
\\
idle'
env
[
'HOMEDRIVE'
]
=
'C:
\\
'
tester
(
'ntpath.expanduser("~test")'
,
'C:
\\
eric
\\
test'
)
tester
(
'ntpath.expanduser("~")'
,
'C:
\\
eric
\\
idle'
)
del
env
[
'HOMEDRIVE'
]
tester
(
'ntpath.expanduser("~test")'
,
'eric
\\
test'
)
tester
(
'ntpath.expanduser("~")'
,
'eric
\\
idle'
)
env
.
clear
()
env
[
'USERPROFILE'
]
=
'C:
\\
eric
\\
idle'
tester
(
'ntpath.expanduser("~test")'
,
'C:
\\
eric
\\
test'
)
tester
(
'ntpath.expanduser("~")'
,
'C:
\\
eric
\\
idle'
)
env
.
clear
()
env
[
'HOME'
]
=
'C:
\\
idle
\\
eric'
tester
(
'ntpath.expanduser("~test")'
,
'C:
\\
idle
\\
test'
)
tester
(
'ntpath.expanduser("~")'
,
'C:
\\
idle
\\
eric'
)
tester
(
'ntpath.expanduser("~test
\\
foo
\\
bar")'
,
'C:
\\
idle
\\
test
\\
foo
\\
bar'
)
tester
(
'ntpath.expanduser("~test/foo/bar")'
,
'C:
\\
idle
\\
test/foo/bar'
)
tester
(
'ntpath.expanduser("~
\\
foo
\\
bar")'
,
'C:
\\
idle
\\
eric
\\
foo
\\
bar'
)
tester
(
'ntpath.expanduser("~/foo/bar")'
,
'C:
\\
idle
\\
eric/foo/bar'
)
def
test_abspath
(
self
):
# ntpath.abspath() can only be used on a system with the "nt" module
# (reasonably), so we protect this test with "import nt". This allows
...
...
Misc/NEWS
Dosyayı görüntüle @
ffc1e6d4
...
...
@@ -46,6 +46,9 @@ Library
Tests
-----
- Issue #21493: Added test for ntpath.expanduser(). Original patch by
Claudiu Popa.
- Issue #19925: Added tests for the spwd module. Original patch by Vajrasky Kok.
- Issue #21522: Added Tkinter tests for Listbox.itemconfigure(),
...
...
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