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
b6080b69
Kaydet (Commit)
b6080b69
authored
Eki 06, 2011
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix size estimate for test_unicode_repr
üst
a5d9917d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
test_bigmem.py
Lib/test/test_bigmem.py
+7
-1
No files found.
Lib/test/test_bigmem.py
Dosyayı görüntüle @
b6080b69
...
@@ -701,7 +701,13 @@ class StrTest(unittest.TestCase, BaseStrTest):
...
@@ -701,7 +701,13 @@ class StrTest(unittest.TestCase, BaseStrTest):
self
.
assertEqual
(
s
.
count
(
'
\\
'
),
size
)
self
.
assertEqual
(
s
.
count
(
'
\\
'
),
size
)
self
.
assertEqual
(
s
.
count
(
'0'
),
size
*
2
)
self
.
assertEqual
(
s
.
count
(
'0'
),
size
*
2
)
@bigmemtest
(
size
=
_2G
//
5
+
1
,
memuse
=
ucs2_char_size
+
ascii_char_size
*
6
)
# ascii() calls encode('ascii', 'backslashreplace'), which itself
# creates a temporary Py_UNICODE representation in addition to the
# original (Py_UCS2) one
# There's also some overallocation when resizing the ascii() result
# that isn't taken into account here.
@bigmemtest
(
size
=
_2G
//
5
+
1
,
memuse
=
ucs2_char_size
+
ucs4_char_size
+
ascii_char_size
*
6
)
def
test_unicode_repr
(
self
,
size
):
def
test_unicode_repr
(
self
,
size
):
# Use an assigned, but not printable code point.
# Use an assigned, but not printable code point.
# It is in the range of the low surrogates \uDC00-\uDFFF.
# It is in the range of the low surrogates \uDC00-\uDFFF.
...
...
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