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
80f0c824
Kaydet (Commit)
80f0c824
authored
Eki 12, 2014
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed and optimized a test of issue #22526.
üst
987a02b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
test_file2k.py
Lib/test/test_file2k.py
+8
-6
No files found.
Lib/test/test_file2k.py
Dosyayı görüntüle @
80f0c824
...
...
@@ -14,7 +14,7 @@ except ImportError:
threading
=
None
from
test
import
test_support
from
test.test_support
import
TESTFN
,
run_unittest
from
test.test_support
import
TESTFN
,
run_unittest
,
requires
from
UserList
import
UserList
class
AutoFileTests
(
unittest
.
TestCase
):
...
...
@@ -437,16 +437,18 @@ class OtherFileTests(unittest.TestCase):
f
.
close
()
@unittest.skipUnless
(
sys
.
maxsize
>
2
**
31
,
"requires 64-bit system"
)
@test_support.precisionbigmemtest
(
2
**
31
,
1
)
def
test_very_long_line
(
self
,
max
size
):
@test_support.precisionbigmemtest
(
2
**
31
,
2.5
,
dry_run
=
False
)
def
test_very_long_line
(
self
,
size
):
# Issue #22526
requires
(
'largefile'
)
with
open
(
TESTFN
,
"wb"
)
as
fp
:
fp
.
write
(
"
\0
"
*
2
**
31
)
fp
.
seek
(
size
-
1
)
fp
.
write
(
"
\0
"
)
with
open
(
TESTFN
,
"rb"
)
as
fp
:
for
l
in
fp
:
pass
self
.
assertEqual
(
len
(
l
),
2
**
31
)
self
.
assertEqual
(
l
.
count
(
"
\0
"
),
2
**
31
)
self
.
assertEqual
(
len
(
l
),
size
)
self
.
assertEqual
(
l
.
count
(
"
\0
"
),
size
)
l
=
None
class
FileSubclassTests
(
unittest
.
TestCase
):
...
...
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