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
36897e1f
Kaydet (Commit)
36897e1f
authored
Tem 26, 2008
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
disable some failing tests in test_locale due to a bug in locale.py.
this should fix the failures on the solaris buildbot.
üst
cd48d8ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
test_locale.py
Lib/test/test_locale.py
+14
-15
No files found.
Lib/test/test_locale.py
Dosyayı görüntüle @
36897e1f
...
@@ -127,9 +127,10 @@ class BaseFormattingTest(object):
...
@@ -127,9 +127,10 @@ class BaseFormattingTest(object):
class
EnUSNumberFormatting
(
BaseFormattingTest
):
class
EnUSNumberFormatting
(
BaseFormattingTest
):
# XXX there is a grouping + padding bug when the thousands separator
# is empty but the grouping array contains values (e.g. Solaris 10)
def
setUp
(
self
):
def
setUp
(
self
):
# NOTE: On Solaris 10, the thousands_sep is the empty string
self
.
sep
=
locale
.
localeconv
()[
'thousands_sep'
]
self
.
sep
=
locale
.
localeconv
()[
'thousands_sep'
]
def
test_grouping
(
self
):
def
test_grouping
(
self
):
...
@@ -140,17 +141,11 @@ class EnUSNumberFormatting(BaseFormattingTest):
...
@@ -140,17 +141,11 @@ class EnUSNumberFormatting(BaseFormattingTest):
def
test_grouping_and_padding
(
self
):
def
test_grouping_and_padding
(
self
):
self
.
_test_format
(
"
%20
.f"
,
-
42
,
grouping
=
1
,
out
=
'-42'
.
rjust
(
20
))
self
.
_test_format
(
"
%20
.f"
,
-
42
,
grouping
=
1
,
out
=
'-42'
.
rjust
(
20
))
try
:
if
self
.
sep
:
self
.
_test_format
(
"
%+10
.f"
,
-
4200
,
grouping
=
1
,
self
.
_test_format
(
"
%+10
.f"
,
-
4200
,
grouping
=
1
,
out
=
(
'-4
%
s200'
%
self
.
sep
)
.
rjust
(
10
))
out
=
(
'-4
%
s200'
%
self
.
sep
)
.
rjust
(
10
))
self
.
_test_format
(
"
%-10
.f"
,
-
4200
,
grouping
=
1
,
self
.
_test_format
(
"
%-10
.f"
,
-
4200
,
grouping
=
1
,
out
=
(
'-4
%
s200'
%
self
.
sep
)
.
ljust
(
10
))
out
=
(
'-4
%
s200'
%
self
.
sep
)
.
ljust
(
10
))
except
AssertionError
:
# Temp debug for the Solaris buildbot
import
pprint
print
pprint
.
pprint
(
locale
.
localeconv
())
raise
def
test_integer_grouping
(
self
):
def
test_integer_grouping
(
self
):
self
.
_test_format
(
"
%
d"
,
4200
,
grouping
=
True
,
out
=
'4
%
s200'
%
self
.
sep
)
self
.
_test_format
(
"
%
d"
,
4200
,
grouping
=
True
,
out
=
'4
%
s200'
%
self
.
sep
)
...
@@ -177,17 +172,21 @@ class EnUSNumberFormatting(BaseFormattingTest):
...
@@ -177,17 +172,21 @@ class EnUSNumberFormatting(BaseFormattingTest):
# Dots in formatting string
# Dots in formatting string
self
.
_test_format_string
(
".
%
f."
,
1000.0
,
out
=
'.1000.000000.'
)
self
.
_test_format_string
(
".
%
f."
,
1000.0
,
out
=
'.1000.000000.'
)
# Padding
# Padding
self
.
_test_format_string
(
"-->
%10.2
f"
,
4200
,
grouping
=
1
,
if
self
.
sep
:
out
=
'--> '
+
(
'4
%
s200.00'
%
self
.
sep
)
.
rjust
(
10
))
self
.
_test_format_string
(
"-->
%10.2
f"
,
4200
,
grouping
=
1
,
out
=
'--> '
+
(
'4
%
s200.00'
%
self
.
sep
)
.
rjust
(
10
))
# Asterisk formats
# Asterisk formats
self
.
_test_format_string
(
"
%10.*
f"
,
(
2
,
1000
),
grouping
=
0
,
self
.
_test_format_string
(
"
%10.*
f"
,
(
2
,
1000
),
grouping
=
0
,
out
=
'1000.00'
.
rjust
(
10
))
out
=
'1000.00'
.
rjust
(
10
))
self
.
_test_format_string
(
"
%*.*
f"
,
(
10
,
2
,
1000
),
grouping
=
1
,
if
self
.
sep
:
out
=
(
'1
%
s000.00'
%
self
.
sep
)
.
rjust
(
10
))
self
.
_test_format_string
(
"
%*.*
f"
,
(
10
,
2
,
1000
),
grouping
=
1
,
out
=
(
'1
%
s000.00'
%
self
.
sep
)
.
rjust
(
10
))
# Test more-in-one
# Test more-in-one
self
.
_test_format_string
(
"int
%
i float
%.2
f str
%
s"
,
if
self
.
sep
:
(
1000
,
1000.0
,
'str'
),
grouping
=
1
,
self
.
_test_format_string
(
"int
%
i float
%.2
f str
%
s"
,
out
=
'int 1
%
s000 float 1
%
s000.00 str str'
%
(
self
.
sep
,
self
.
sep
))
(
1000
,
1000.0
,
'str'
),
grouping
=
1
,
out
=
'int 1
%
s000 float 1
%
s000.00 str str'
%
(
self
.
sep
,
self
.
sep
))
class
TestNumberFormatting
(
BaseLocalizedTest
,
EnUSNumberFormatting
):
class
TestNumberFormatting
(
BaseLocalizedTest
,
EnUSNumberFormatting
):
...
...
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