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
305b9246
Kaydet (Commit)
305b9246
authored
May 24, 2007
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix test_bool and test_bufio.
üst
6f376c40
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
test_bool.py
Lib/test/test_bool.py
+2
-2
test_bufio.py
Lib/test/test_bufio.py
+5
-5
No files found.
Lib/test/test_bool.py
Dosyayı görüntüle @
305b9246
...
...
@@ -26,10 +26,10 @@ class BoolTest(unittest.TestCase):
def
test_print
(
self
):
try
:
fo
=
open
(
test_support
.
TESTFN
,
"w
b
"
)
fo
=
open
(
test_support
.
TESTFN
,
"w"
)
print
(
False
,
True
,
file
=
fo
)
fo
.
close
()
fo
=
open
(
test_support
.
TESTFN
,
"r
b
"
)
fo
=
open
(
test_support
.
TESTFN
,
"r"
)
self
.
assertEqual
(
fo
.
read
(),
'False True
\n
'
)
finally
:
fo
.
close
()
...
...
Lib/test/test_bufio.py
Dosyayı görüntüle @
305b9246
...
...
@@ -19,12 +19,12 @@ class BufferSizeTest(unittest.TestCase):
try
:
# write once with \n and once without
f
.
write
(
s
)
f
.
write
(
"
\n
"
)
f
.
write
(
b
"
\n
"
)
f
.
write
(
s
)
f
.
close
()
f
=
open
(
test_support
.
TESTFN
,
"rb"
)
line
=
f
.
readline
()
self
.
assertEqual
(
line
,
s
+
"
\n
"
)
self
.
assertEqual
(
line
,
s
+
b
"
\n
"
)
line
=
f
.
readline
()
self
.
assertEqual
(
line
,
s
)
line
=
f
.
readline
()
...
...
@@ -48,16 +48,16 @@ class BufferSizeTest(unittest.TestCase):
teststring
=
pattern
*
q
+
pattern
[:
r
]
self
.
assertEqual
(
len
(
teststring
),
length
)
self
.
try_one
(
teststring
)
self
.
try_one
(
teststring
+
"x"
)
self
.
try_one
(
teststring
+
b
"x"
)
self
.
try_one
(
teststring
[:
-
1
])
def
test_primepat
(
self
):
# A pattern with prime length, to avoid simple relationships with
# stdio buffer sizes.
self
.
drive_one
(
"1234567890
\00\01\02\03\04\05\06
"
)
self
.
drive_one
(
b
"1234567890
\00\01\02\03\04\05\06
"
)
def
test_nullpat
(
self
):
self
.
drive_one
(
"
\0
"
*
1000
)
self
.
drive_one
(
bytes
(
1000
)
)
def
test_main
():
test_support
.
run_unittest
(
BufferSizeTest
)
...
...
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