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
13bdfa7a
Kaydet (Commit)
13bdfa7a
authored
Agu 31, 2013
tarafından
Ethan Furman
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #18780: code cleanup.
üst
a4121372
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
34 deletions
+19
-34
test_unicode.py
Lib/test/test_unicode.py
+19
-34
No files found.
Lib/test/test_unicode.py
Dosyayı görüntüle @
13bdfa7a
...
...
@@ -1134,42 +1134,27 @@ class UnicodeTest(string_tests.CommonTest,
class
Str
(
str
,
enum
.
Enum
):
ABC
=
'abc'
# Testing Unicode formatting strings...
self
.
assertEqual
(
"
%
s,
%
s"
%
(
Str
.
ABC
,
Str
.
ABC
),
'Str.ABC, Str.ABC'
,
)
self
.
assertEqual
(
"
%
s,
%
s,
%
d,
%
i,
%
u,
%
f,
%5.2
f"
%
(
Str
.
ABC
,
Str
.
ABC
,
Int
.
IDES
,
Int
.
IDES
,
Int
.
IDES
,
Float
.
PI
,
Float
.
PI
),
'Str.ABC, Str.ABC, 15, 15, 15, 3.141593, 3.14'
)
self
.
assertEqual
(
"
%
s,
%
s"
%
(
Str
.
ABC
,
Str
.
ABC
),
'Str.ABC, Str.ABC'
)
self
.
assertEqual
(
"
%
s,
%
s,
%
d,
%
i,
%
u,
%
f,
%5.2
f"
%
(
Str
.
ABC
,
Str
.
ABC
,
Int
.
IDES
,
Int
.
IDES
,
Int
.
IDES
,
Float
.
PI
,
Float
.
PI
),
'Str.ABC, Str.ABC, 15, 15, 15, 3.141593, 3.14'
)
# formatting jobs delegated from the string implementation:
self
.
assertEqual
(
'...
%(foo)
s...'
%
{
'foo'
:
Str
.
ABC
},
'...Str.ABC...'
,
)
self
.
assertEqual
(
'...
%(foo)
s...'
%
{
'foo'
:
Int
.
IDES
},
'...Int.IDES...'
,
)
self
.
assertEqual
(
'...
%(foo)
i...'
%
{
'foo'
:
Int
.
IDES
},
'...15...'
,
)
self
.
assertEqual
(
'...
%(foo)
d...'
%
{
'foo'
:
Int
.
IDES
},
'...15...'
,
)
self
.
assertEqual
(
'...
%(foo)
u...'
%
{
'foo'
:
Int
.
IDES
,
'def'
:
Float
.
PI
},
'...15...'
,
)
self
.
assertEqual
(
'...
%(foo)
f...'
%
{
'foo'
:
Float
.
PI
,
'def'
:
123
},
'...3.141593...'
,
)
self
.
assertEqual
(
'...
%(foo)
s...'
%
{
'foo'
:
Str
.
ABC
},
'...Str.ABC...'
)
self
.
assertEqual
(
'...
%(foo)
s...'
%
{
'foo'
:
Int
.
IDES
},
'...Int.IDES...'
)
self
.
assertEqual
(
'...
%(foo)
i...'
%
{
'foo'
:
Int
.
IDES
},
'...15...'
)
self
.
assertEqual
(
'...
%(foo)
d...'
%
{
'foo'
:
Int
.
IDES
},
'...15...'
)
self
.
assertEqual
(
'...
%(foo)
u...'
%
{
'foo'
:
Int
.
IDES
,
'def'
:
Float
.
PI
},
'...15...'
)
self
.
assertEqual
(
'...
%(foo)
f...'
%
{
'foo'
:
Float
.
PI
,
'def'
:
123
},
'...3.141593...'
)
@support.cpython_only
def
test_formatting_huge_precision
(
self
):
...
...
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