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
209ea39d
Kaydet (Commit)
209ea39d
authored
Ock 27, 2008
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Sync up with trunk. Try to flush repeatedly to ensure the exception is raised.
üst
0b11c5fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
test_resource.py
Lib/test/test_resource.py
+7
-5
No files found.
Lib/test/test_resource.py
Dosyayı görüntüle @
209ea39d
import
os
import
resource
from
test.test_support
import
TESTFN
from
test.test_support
import
TESTFN
,
unlink
# This test is checking a few specific problem spots. RLIMIT_FSIZE
# should be RLIM_INFINITY, which will be a really big number on a
...
...
@@ -38,17 +38,19 @@ try:
f
.
flush
()
# On some systems (e.g., Ubuntu on hppa) the flush()
# doesn't always cause the exception, but the close()
# does eventually. Try
clos
ing several times in an attempt
# does eventually. Try
flush
ing several times in an attempt
# to ensure the file is really synced and the exception raised.
for
i
in
range
(
5
):
f
.
close
()
time
.
sleep
(
.
1
)
f
.
flush
()
except
IOError
:
if
not
limit_set
:
raise
f
.
close
()
os
.
unlink
(
TESTFN
)
finally
:
resource
.
setrlimit
(
resource
.
RLIMIT_FSIZE
,
(
cur
,
max
))
if
limit_set
:
resource
.
setrlimit
(
resource
.
RLIMIT_FSIZE
,
(
cur
,
max
))
unlink
(
TESTFN
)
# And be sure that setrlimit is checking for really large values
too_big
=
10L
**
50
...
...
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