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
15d1079d
Kaydet (Commit)
15d1079d
authored
Ara 12, 1996
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed test_strftime to be silent when called from autotest.
üst
483705c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
test_strftime
Lib/test/output/test_strftime
+0
-4
test_strftime.py
Lib/test/test_strftime.py
+15
-5
No files found.
Lib/test/output/test_strftime
Dosyayı görüntüle @
15d1079d
test_strftime
Strftime test, platform: irix5, Python version: 1.4
Does not appear to support '%k' format
Does not appear to support '%s' format
Does not appear to support '%3y' format
Lib/test/test_strftime.py
Dosyayı görüntüle @
15d1079d
...
...
@@ -4,6 +4,11 @@
import
time
,
calendar
,
sys
,
string
,
os
verbose
=
0
if
__name__
==
'__main__'
:
verbose
=
1
now
=
time
.
time
()
fp
=
os
.
popen
(
'date'
)
fromdate
=
string
.
strip
(
fp
.
readline
())
...
...
@@ -35,14 +40,12 @@ expectations = (
(
'
%
b'
,
calendar
.
month_abbr
[
now
[
1
]],
'abbreviated month name'
),
(
'
%
h'
,
calendar
.
month_abbr
[
now
[
1
]],
'abbreviated month name'
),
(
'
%
c'
,
time
.
asctime
(
now
),
'asctime() format'
),
(
'
%
C'
,
fromdate
,
'date(1) format'
),
(
'
%
D'
,
'
%02
d/
%02
d/
%02
d'
%
(
now
[
1
],
now
[
2
],
(
now
[
0
]
%
100
)),
'mm/dd/yy'
),
(
'
%
d'
,
'
%02
d'
%
now
[
2
],
'day of month as number (00-31)'
),
(
'
%
e'
,
'
%2
d'
%
now
[
2
],
'day of month as number, blank padded ( 0-31)'
),
(
'
%
H'
,
'
%02
d'
%
now
[
3
],
'hour (00-23)'
),
(
'
%
I'
,
'
%02
d'
%
clock12
,
'hour (00-12)'
),
(
'
%
j'
,
'
%03
d'
%
now
[
7
],
'julian day (001-366)'
),
(
'
%
k'
,
'
%2
d'
%
now
[
3
],
'hour, blank padded ( 0-23)'
),
(
'
%
M'
,
'
%02
d'
%
now
[
4
],
'minute, (00-59)'
),
(
'
%
m'
,
'
%02
d'
%
now
[
1
],
'month as number (01-12)'
),
(
'
%
n'
,
'
\n
'
,
'newline character'
),
...
...
@@ -52,7 +55,6 @@ expectations = (
'
%
I:
%
M:
%
S
%
p'
),
(
'
%
t'
,
'
\t
'
,
'tab character'
),
(
'
%
S'
,
'
%02
d'
%
now
[
5
],
'seconds of current time (00-60)'
),
(
'
%
s'
,
'
%
d'
%
nowsecs
,
'seconds since the Epoch in UCT'
),
(
'
%
T'
,
'
%02
d:
%02
d:
%02
d'
%
(
now
[
3
],
now
[
4
],
now
[
5
]),
'
%
H:
%
M:
%
S'
),
(
'
%
X'
,
'
%02
d:
%02
d:
%02
d'
%
(
now
[
3
],
now
[
4
],
now
[
5
]),
'
%
H:
%
M:
%
S'
),
(
'
%
U'
,
'
%02
d'
%
(
1
+
(
wk1offset
+
now
[
7
])
/
7
),
...
...
@@ -65,12 +67,20 @@ expectations = (
(
'
%
y'
,
'
%02
d'
%
(
now
[
0
]
%
100
),
'year without century'
),
(
'
%
Z'
,
tz
,
'time zone name'
),
(
'
%%
'
,
'
%
'
,
'single percent sign'
),
)
nonstandard_expectations
=
(
(
'
%
C'
,
fromdate
,
'date(1) format'
),
(
'
%
k'
,
'
%2
d'
%
now
[
3
],
'hour, blank padded ( 0-23)'
),
(
'
%
s'
,
'
%
d'
%
nowsecs
,
'seconds since the Epoch in UCT'
),
(
'
%3
y'
,
'
%03
d'
%
(
now
[
0
]
%
100
),
'year without century rendered using fieldwidth'
),
)
print
"Strftime test, platform:
%
s, Python version:
%
s"
%
\
(
sys
.
platform
,
string
.
split
(
sys
.
version
)[
0
])
if
verbose
:
print
"Strftime test, platform:
%
s, Python version:
%
s"
%
\
(
sys
.
platform
,
string
.
split
(
sys
.
version
)[
0
])
expectations
=
expectations
+
nonstandard_expectations
for
e
in
expectations
:
result
=
time
.
strftime
(
e
[
0
],
now
)
...
...
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