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
10fe4555
Kaydet (Commit)
10fe4555
authored
Nis 04, 2007
tarafından
Collin Winter
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make test_softspace use unittest.
üst
82c36715
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
test_softspace.py
Lib/test/test_softspace.py
+17
-8
No files found.
Lib/test/test_softspace.py
Dosyayı görüntüle @
10fe4555
from
test
import
test_support
from
test.test_support
import
run_unittest
import
unittest
import
StringIO
# SF bug 480215: softspace confused in nested print
f
=
StringIO
.
StringIO
()
class
C
:
class
SoftspaceTests
(
unittest
.
TestCase
):
def
test_bug_480215
(
self
):
# SF bug 480215: softspace confused in nested print
f
=
StringIO
.
StringIO
()
class
C
:
def
__str__
(
self
):
print
>>
f
,
'a'
return
'b'
print
>>
f
,
C
(),
'c '
,
'd
\t
'
,
'e'
print
>>
f
,
'f'
,
'g'
# In 2.2 & earlier, this printed ' a\nbc d\te\nf g\n'
test_support
.
vereq
(
f
.
getvalue
(),
'a
\n
b c d
\t
e
\n
f g
\n
'
)
print
>>
f
,
C
(),
'c '
,
'd
\t
'
,
'e'
print
>>
f
,
'f'
,
'g'
# In 2.2 & earlier, this printed ' a\nbc d\te\nf g\n'
self
.
assertEqual
(
f
.
getvalue
(),
'a
\n
b c d
\t
e
\n
f g
\n
'
)
def
test_main
():
run_unittest
(
SoftspaceTests
)
if
__name__
==
'__main__'
:
test_main
()
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