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
af5aee57
Kaydet (Commit)
af5aee57
authored
Ock 08, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #1777412: fix test_time for Mac OS X and OpenIndiana
üst
73691326
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
test_time.py
Lib/test/test_time.py
+14
-9
No files found.
Lib/test/test_time.py
Dosyayı görüntüle @
af5aee57
...
...
@@ -293,17 +293,22 @@ class _TestStrftimeYear:
try
:
text
=
self
.
yearstr
(
12345
)
except
ValueError
:
# If Python is compiled with Visual Studio,
# year is limited to [1; 9999]
# strftime() is limited to [1; 9999] with Visual Studio
pass
else
:
self
.
assertEqual
(
text
,
'12345'
)
# Issue #10864: OpenIndiana is limited to 4 digits, but Python
# doesn't raise a ValueError
#self.assertEqual(text, '12345')
self
.
assertIn
(
text
,
(
'2345'
,
'12345'
))
try
:
text
=
self
.
yearstr
(
123456789
)
except
ValueError
:
pass
else
:
self
.
assertEqual
(
text
,
'123456789'
)
# Issue #10864: OpenIndiana is limited to 4 digits, but Python
# doesn't raise a ValueError
#self.assertEqual(text, '123456789')
self
.
assertIn
(
text
,
(
'123456789'
,
'6789'
))
class
_Test2dYear
(
_BaseYearTest
):
accept2dyear
=
1
...
...
@@ -324,11 +329,11 @@ class _Test4dYear(_BaseYearTest):
accept2dyear
=
0
def
test_year
(
self
):
self
.
assert
Equal
(
self
.
yearstr
(
1
),
'1'
)
self
.
assert
Equal
(
self
.
yearstr
(
69
),
'69'
)
self
.
assert
Equal
(
self
.
yearstr
(
68
),
'68'
)
self
.
assert
Equal
(
self
.
yearstr
(
99
),
'99'
)
self
.
assert
Equal
(
self
.
yearstr
(
999
),
'999'
)
self
.
assert
In
(
self
.
yearstr
(
1
),
(
'1'
,
'0001'
)
)
self
.
assert
In
(
self
.
yearstr
(
68
),
(
'68'
,
'0068'
)
)
self
.
assert
In
(
self
.
yearstr
(
69
),
(
'69'
,
'0069'
)
)
self
.
assert
In
(
self
.
yearstr
(
99
),
(
'99'
,
'0099'
)
)
self
.
assert
In
(
self
.
yearstr
(
999
),
(
'999'
,
'0999'
)
)
self
.
assertEqual
(
self
.
yearstr
(
9999
),
'9999'
)
class
TestAsctimeAccept2dYear
(
_TestAsctimeYear
,
_Test2dYear
):
...
...
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