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
050a61f8
Kaydet (Commit)
050a61f8
authored
Eyl 21, 2012
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
#15304: merge with 3.2.
üst
8b15ee0d
e418d760
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
support.py
Lib/test/support.py
+1
-1
test_support.py
Lib/test/test_support.py
+9
-0
NEWS
Misc/NEWS
+4
-0
No files found.
Lib/test/support.py
Dosyayı görüntüle @
050a61f8
...
@@ -680,7 +680,7 @@ def temp_cwd(name='tempcwd', quiet=False, path=None):
...
@@ -680,7 +680,7 @@ def temp_cwd(name='tempcwd', quiet=False, path=None):
except
OSError
:
except
OSError
:
if
not
quiet
:
if
not
quiet
:
raise
raise
warnings
.
warn
(
'tests may fail, unable to change the CWD to '
+
name
,
warnings
.
warn
(
'tests may fail, unable to change the CWD to '
+
path
,
RuntimeWarning
,
stacklevel
=
3
)
RuntimeWarning
,
stacklevel
=
3
)
try
:
try
:
yield
os
.
getcwd
()
yield
os
.
getcwd
()
...
...
Lib/test/test_support.py
Dosyayı görüntüle @
050a61f8
...
@@ -95,6 +95,15 @@ class TestSupport(unittest.TestCase):
...
@@ -95,6 +95,15 @@ class TestSupport(unittest.TestCase):
self
.
assertFalse
(
os
.
path
.
exists
(
TESTFN
))
self
.
assertFalse
(
os
.
path
.
exists
(
TESTFN
))
self
.
assertTrue
(
os
.
path
.
basename
(
os
.
getcwd
()),
here
)
self
.
assertTrue
(
os
.
path
.
basename
(
os
.
getcwd
()),
here
)
def
test_temp_cwd__chdir_warning
(
self
):
"""Check the warning message when os.chdir() fails."""
path
=
TESTFN
+
'_does_not_exist'
with
support
.
check_warnings
()
as
recorder
:
with
support
.
temp_cwd
(
path
=
path
,
quiet
=
True
):
pass
messages
=
[
str
(
w
.
message
)
for
w
in
recorder
.
warnings
]
self
.
assertEqual
(
messages
,
[
'tests may fail, unable to change the CWD to '
+
path
])
def
test_sortdict
(
self
):
def
test_sortdict
(
self
):
self
.
assertEqual
(
support
.
sortdict
({
3
:
3
,
2
:
2
,
1
:
1
}),
"{1: 1, 2: 2, 3: 3}"
)
self
.
assertEqual
(
support
.
sortdict
({
3
:
3
,
2
:
2
,
1
:
1
}),
"{1: 1, 2: 2, 3: 3}"
)
...
...
Misc/NEWS
Dosyayı görüntüle @
050a61f8
...
@@ -84,6 +84,10 @@ Extension Modules
...
@@ -84,6 +84,10 @@ Extension Modules
Tests
Tests
-----
-----
- Issue #15304: Fix warning message when os.chdir() fails inside
test.support.temp_cwd(). Patch by Chris Jerdonek.
- Issue #15802: Fix test logic in TestMaildir.test_create_tmp. Patch
- Issue #15802: Fix test logic in TestMaildir.test_create_tmp. Patch
by Serhiy Storchaka.
by Serhiy Storchaka.
...
...
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