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
87f09371
Kaydet (Commit)
87f09371
authored
Eyl 14, 2013
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#18856: improve test coverage of the calendar module. Patch by Madison May.
üst
e7f4c1c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
test_calendar.py
Lib/test/test_calendar.py
+21
-0
No files found.
Lib/test/test_calendar.py
Dosyayı görüntüle @
87f09371
...
...
@@ -399,6 +399,27 @@ class OutputTestCase(unittest.TestCase):
'<tr><th colspan="7" class="month">January</th></tr>'
)
def
test_prweek
(
self
):
with
support
.
captured_stdout
()
as
out
:
week
=
[(
1
,
0
),
(
2
,
1
),
(
3
,
2
),
(
4
,
3
),
(
5
,
4
),
(
6
,
5
),
(
7
,
6
)]
calendar
.
TextCalendar
()
.
prweek
(
week
,
1
)
self
.
assertEqual
(
out
.
getvalue
()
.
strip
(),
"1 2 3 4 5 6 7"
)
def
test_prmonth
(
self
):
with
support
.
captured_stdout
()
as
out
:
calendar
.
TextCalendar
()
.
prmonth
(
2004
,
1
)
output
=
out
.
getvalue
()
.
strip
()
self
.
assertEqual
(
output
,
result_2004_01_text
.
strip
())
def
test_pryear
(
self
):
with
support
.
captured_stdout
()
as
out
:
calendar
.
TextCalendar
()
.
pryear
(
2004
)
self
.
assertEqual
(
out
.
getvalue
()
.
strip
(),
result_2004_text
.
strip
())
def
test_format
(
self
):
with
support
.
captured_stdout
()
as
out
:
calendar
.
format
([
"1"
,
"2"
,
"3"
],
colwidth
=
3
,
spacing
=
1
)
self
.
assertEqual
(
out
.
getvalue
()
.
strip
(),
"1 2 3"
)
class
CalendarTestCase
(
unittest
.
TestCase
):
def
test_isleap
(
self
):
...
...
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