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
4b2b43d9
Kaydet (Commit)
4b2b43d9
authored
Ock 05, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
regrtest: close the new stdout and restore the original stdout at exit
Fix a ResourceWarning(unclosed file).
üst
358e11d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
regrtest.py
Lib/test/regrtest.py
+10
-1
No files found.
Lib/test/regrtest.py
Dosyayı görüntüle @
4b2b43d9
...
...
@@ -743,10 +743,19 @@ def replace_stdout():
if
os
.
name
==
"nt"
:
# Replace sys.stdout breaks the stdout newlines on Windows: issue #8533
return
import
atexit
stdout
=
sys
.
stdout
sys
.
stdout
=
open
(
stdout
.
fileno
(),
'w'
,
encoding
=
stdout
.
encoding
,
errors
=
"backslashreplace"
)
errors
=
"backslashreplace"
,
closefd
=
False
)
def
restore_stdout
():
sys
.
stdout
.
close
()
sys
.
stdout
=
stdout
atexit
.
register
(
restore_stdout
)
def
runtest
(
test
,
verbose
,
quiet
,
huntrleaks
=
False
,
debug
=
False
,
use_resources
=
None
):
...
...
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