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
2595e760
Kaydet (Commit)
2595e760
authored
Mar 24, 2008
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Ensure cleanup does not reference variables that don't yet exist.
üst
64018ae0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
test_fileinput.py
Lib/test/test_fileinput.py
+4
-0
No files found.
Lib/test/test_fileinput.py
Dosyayı görüntüle @
2595e760
...
...
@@ -34,6 +34,7 @@ class BufferSizesTests(unittest.TestCase):
def
test_buffer_sizes
(
self
):
# First, run the tests with default and teeny buffer size.
for
round
,
bs
in
(
0
,
0
),
(
1
,
30
):
t1
=
t2
=
t3
=
t4
=
None
try
:
t1
=
writeTmp
(
1
,
[
"Line
%
s of file 1
\n
"
%
(
i
+
1
)
for
i
in
range
(
15
)])
t2
=
writeTmp
(
2
,
[
"Line
%
s of file 2
\n
"
%
(
i
+
1
)
for
i
in
range
(
10
)])
...
...
@@ -122,6 +123,7 @@ class BufferSizesTests(unittest.TestCase):
class
FileInputTests
(
unittest
.
TestCase
):
def
test_zero_byte_files
(
self
):
t1
=
t2
=
t3
=
t4
=
None
try
:
t1
=
writeTmp
(
1
,
[
""
])
t2
=
writeTmp
(
2
,
[
""
])
...
...
@@ -145,6 +147,7 @@ class FileInputTests(unittest.TestCase):
remove_tempfiles
(
t1
,
t2
,
t3
,
t4
)
def
test_files_that_dont_end_with_newline
(
self
):
t1
=
t2
=
None
try
:
t1
=
writeTmp
(
1
,
[
"A
\n
B
\n
C"
])
t2
=
writeTmp
(
2
,
[
"D
\n
E
\n
F"
])
...
...
@@ -171,6 +174,7 @@ class FileInputTests(unittest.TestCase):
## remove_tempfiles(t1)
def
test_fileno
(
self
):
t1
=
t2
=
None
try
:
t1
=
writeTmp
(
1
,
[
"A
\n
B"
])
t2
=
writeTmp
(
2
,
[
"C
\n
D"
])
...
...
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