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
53d3645f
Kaydet (Commit)
53d3645f
authored
Ock 27, 2012
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #13847: Make test_localtime_failure() more robust
Skip the test if we are unable to find an invalid time_t value.
üst
2cbae98e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
test_time.py
Lib/test/test_time.py
+8
-3
No files found.
Lib/test/test_time.py
Dosyayı görüntüle @
53d3645f
...
...
@@ -345,16 +345,21 @@ class TimeTestCase(unittest.TestCase):
def
test_localtime_failure
(
self
):
# Issue #13847: check for localtime() failure
invalid_time_t
=
2
**
60
invalid_time_t
=
None
for
time_t
in
(
-
1
,
2
**
30
,
2
**
33
,
2
**
60
):
try
:
time
.
localtime
(
invalid_
time_t
)
time
.
localtime
(
time_t
)
except
ValueError
as
err
:
if
str
(
err
)
==
"timestamp out of range for platform time_t"
:
self
.
skipTest
(
"need 64-bit time_t"
)
else
:
raise
except
OSError
:
pass
invalid_time_t
=
time_t
break
if
invalid_time_t
is
None
:
self
.
skipTest
(
"unable to find an invalid time_t value"
)
self
.
assertRaises
(
OSError
,
time
.
localtime
,
invalid_time_t
)
self
.
assertRaises
(
OSError
,
time
.
gmtime
,
invalid_time_t
)
self
.
assertRaises
(
OSError
,
time
.
ctime
,
invalid_time_t
)
...
...
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