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
e304852e
Kaydet (Commit)
e304852e
authored
Ara 13, 2009
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#7342: make sure that the datetime object in test_fraction always has a number of microseconds != 0
üst
c4771d2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
test_strptime.py
Lib/test/test_strptime.py
+4
-3
No files found.
Lib/test/test_strptime.py
Dosyayı görüntüle @
e304852e
...
@@ -274,10 +274,11 @@ class StrptimeTests(unittest.TestCase):
...
@@ -274,10 +274,11 @@ class StrptimeTests(unittest.TestCase):
self
.
helper
(
'S'
,
5
)
self
.
helper
(
'S'
,
5
)
def
test_fraction
(
self
):
def
test_fraction
(
self
):
# Test microseconds
import
datetime
import
datetime
now
=
datetime
.
datetime
.
now
(
)
d
=
datetime
.
datetime
(
2012
,
12
,
20
,
12
,
34
,
56
,
78987
)
tup
,
frac
=
_strptime
.
_strptime
(
str
(
now
),
format
=
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S.
%
f"
)
tup
,
frac
=
_strptime
.
_strptime
(
str
(
d
),
format
=
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S.
%
f"
)
self
.
assertEqual
(
frac
,
now
.
microsecond
)
self
.
assertEqual
(
frac
,
d
.
microsecond
)
def
test_weekday
(
self
):
def
test_weekday
(
self
):
# Test weekday directives
# Test weekday directives
...
...
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