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
24b447ed
Unverified
Kaydet (Commit)
24b447ed
authored
Eyl 23, 2018
tarafından
Serhiy Storchaka
Kaydeden (comit)
GitHub
Eyl 23, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use in-memory streams instead of NamedTemporaryFile. (GH-9508)
üst
17b1d5d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
test_log.py
Lib/distutils/tests/test_log.py
+6
-4
No files found.
Lib/distutils/tests/test_log.py
Dosyayı görüntüle @
24b447ed
"""Tests for distutils.log"""
import
io
import
sys
import
unittest
from
tempfile
import
NamedTemporaryFile
from
test.support
import
swap_attr
,
run_unittest
from
distutils
import
log
...
...
@@ -14,9 +14,11 @@ class TestLog(unittest.TestCase):
# output as is.
for
errors
in
(
'strict'
,
'backslashreplace'
,
'surrogateescape'
,
'replace'
,
'ignore'
):
with
self
.
subTest
(
errors
=
errors
),
\
NamedTemporaryFile
(
"w+"
,
encoding
=
'cp437'
,
errors
=
errors
)
as
stdout
,
\
NamedTemporaryFile
(
"w+"
,
encoding
=
'cp437'
,
errors
=
errors
)
as
stderr
:
with
self
.
subTest
(
errors
=
errors
):
stdout
=
io
.
TextIOWrapper
(
io
.
BytesIO
(),
encoding
=
'cp437'
,
errors
=
errors
)
stderr
=
io
.
TextIOWrapper
(
io
.
BytesIO
(),
encoding
=
'cp437'
,
errors
=
errors
)
old_threshold
=
log
.
set_threshold
(
log
.
DEBUG
)
try
:
with
swap_attr
(
sys
,
'stdout'
,
stdout
),
\
...
...
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