B
    u9aÜÂ  ã               @   sú  d dl Z d dlZd dlmZ d dlmZmZ d dlZd dlZd dl	Z	d dl
Z
d dlZdZdZdZdZedd	d
dZdZd d d ddddgdddddddgdddddddgdd d!d"d#d$d%gd&d'd(d)d*d+d ggd d d d d d dgdddddddgdddddddgddddd d!d"gd#d$d%d&d'd(d)ggdddddddgdddddddgdddddd d!gd"d#d$d%d&d'd(gd)d*d+d d d d gggd d d ddddgdddddddgdddddddgdd d!d"d#d$d%gd&d'd(d)d*d d ggd d d d d ddgdddddddgdddddddgdddd d!d"d#gd$d%d&d'd(d)d*gd+d d d d d d ggd ddddddgdddddddgddddddd gd!d"d#d$d%d&d'gd(d)d*d d d d gggd d d ddddgdddddddgdddddddgdd d!d"d#d$d%gd&d'd(d)d*d+d ggd d d d d d dgdddddddgdddddddgddddd d!d"gd#d$d%d&d'd(d)gd*d+d d d d d ggd d dddddgdddddddgdddddddgd d!d"d#d$d%d&gd'd(d)d*d d d gggd d d d dddgdddddddgdddddddgddd d!d"d#d$gd%d&d'd(d)d*d+ggdddddddgdddddddgdddddd d!gd"d#d$d%d&d'd(gd)d*d d d d d ggd d dddddgdddddddgdddddddgd d!d"d#d$d%d&gd'd(d)d*d+d d ggggZd,d-d.d/d0gd0d1d2d3d4gd5d6d7d8d9ggd9d:d;d<d=gd=d>d?d@dAdBgdBdCdDdEdFggdFdGdHdIdJgdJdKdLdMdNdOgdOdPdQdRdSggdSdTdUdVdWgdXdYdZd[d\gd\d]d^d_d`gggZG dadb„ dbejƒZG dcdd„ ddejƒZG dedf„ dfejƒZG dgdh„ dheƒZG didj„ djeƒZG dkdl„ dlejƒZG dmdn„ dnejƒZG dodp„ dpejƒZdqdr„ ZG dsdt„ dtejƒZG dudv„ dvejƒZ G dwdx„ dxejƒZ!e"dykröe #¡  dS )zé    N)Úsupport)Úassert_python_okÚassert_python_failurez     February 0
Mo Tu We Th Fr Sa Su
    1  2  3  4  5  6
 7  8  9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29
a                                     0

      January                   February                   March
Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
                1  2          1  2  3  4  5  6             1  2  3  4  5
 3  4  5  6  7  8  9       7  8  9 10 11 12 13       6  7  8  9 10 11 12
10 11 12 13 14 15 16      14 15 16 17 18 19 20      13 14 15 16 17 18 19
17 18 19 20 21 22 23      21 22 23 24 25 26 27      20 21 22 23 24 25 26
24 25 26 27 28 29 30      28 29                     27 28 29 30 31
31

       April                      May                       June
Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
                1  2       1  2  3  4  5  6  7                1  2  3  4
 3  4  5  6  7  8  9       8  9 10 11 12 13 14       5  6  7  8  9 10 11
10 11 12 13 14 15 16      15 16 17 18 19 20 21      12 13 14 15 16 17 18
17 18 19 20 21 22 23      22 23 24 25 26 27 28      19 20 21 22 23 24 25
24 25 26 27 28 29 30      29 30 31                  26 27 28 29 30

        July                     August                  September
Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
                1  2          1  2  3  4  5  6                   1  2  3
 3  4  5  6  7  8  9       7  8  9 10 11 12 13       4  5  6  7  8  9 10
10 11 12 13 14 15 16      14 15 16 17 18 19 20      11 12 13 14 15 16 17
17 18 19 20 21 22 23      21 22 23 24 25 26 27      18 19 20 21 22 23 24
24 25 26 27 28 29 30      28 29 30 31               25 26 27 28 29 30
31

      October                   November                  December
Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
                   1             1  2  3  4  5                   1  2  3
 2  3  4  5  6  7  8       6  7  8  9 10 11 12       4  5  6  7  8  9 10
 9 10 11 12 13 14 15      13 14 15 16 17 18 19      11 12 13 14 15 16 17
16 17 18 19 20 21 22      20 21 22 23 24 25 26      18 19 20 21 22 23 24
23 24 25 26 27 28 29      27 28 29 30               25 26 27 28 29 30 31
30 31
zŒ    January 2004
Mo Tu We Th Fr Sa Su
          1  2  3  4
 5  6  7  8  9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
a!                                    2004

      January                   February                   March
Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
          1  2  3  4                         1       1  2  3  4  5  6  7
 5  6  7  8  9 10 11       2  3  4  5  6  7  8       8  9 10 11 12 13 14
12 13 14 15 16 17 18       9 10 11 12 13 14 15      15 16 17 18 19 20 21
19 20 21 22 23 24 25      16 17 18 19 20 21 22      22 23 24 25 26 27 28
26 27 28 29 30 31         23 24 25 26 27 28 29      29 30 31

       April                      May                       June
Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
          1  2  3  4                      1  2          1  2  3  4  5  6
 5  6  7  8  9 10 11       3  4  5  6  7  8  9       7  8  9 10 11 12 13
12 13 14 15 16 17 18      10 11 12 13 14 15 16      14 15 16 17 18 19 20
19 20 21 22 23 24 25      17 18 19 20 21 22 23      21 22 23 24 25 26 27
26 27 28 29 30            24 25 26 27 28 29 30      28 29 30
                          31

        July                     August                  September
Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
          1  2  3  4                         1             1  2  3  4  5
 5  6  7  8  9 10 11       2  3  4  5  6  7  8       6  7  8  9 10 11 12
12 13 14 15 16 17 18       9 10 11 12 13 14 15      13 14 15 16 17 18 19
19 20 21 22 23 24 25      16 17 18 19 20 21 22      20 21 22 23 24 25 26
26 27 28 29 30 31         23 24 25 26 27 28 29      27 28 29 30
                          30 31

      October                   November                  December
Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
             1  2  3       1  2  3  4  5  6  7             1  2  3  4  5
 4  5  6  7  8  9 10       8  9 10 11 12 13 14       6  7  8  9 10 11 12
11 12 13 14 15 16 17      15 16 17 18 19 20 21      13 14 15 16 17 18 19
18 19 20 21 22 23 24      22 23 24 25 26 27 28      20 21 22 23 24 25 26
25 26 27 28 29 30 31      29 30                     27 28 29 30 31
ÚyearÚmonthÚascii)r   r   Úencodingax;  <?xml version="1.0" encoding="{encoding}"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset={encoding}" />
<link rel="stylesheet" type="text/css" href="calendar.css" />
<title>Calendar for 2004</title>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" class="{year}">
<tr><th colspan="3" class="{year}">2004</th></tr><tr><td><table border="0" cellpadding="0" cellspacing="0" class="{month}">
<tr><th colspan="7" class="{month}">January</th></tr>
<tr><th class="mon">Mon</th><th class="tue">Tue</th><th class="wed">Wed</th><th class="thu">Thu</th><th class="fri">Fri</th><th class="sat">Sat</th><th class="sun">Sun</th></tr>
<tr><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="thu">1</td><td class="fri">2</td><td class="sat">3</td><td class="sun">4</td></tr>
<tr><td class="mon">5</td><td class="tue">6</td><td class="wed">7</td><td class="thu">8</td><td class="fri">9</td><td class="sat">10</td><td class="sun">11</td></tr>
<tr><td class="mon">12</td><td class="tue">13</td><td class="wed">14</td><td class="thu">15</td><td class="fri">16</td><td class="sat">17</td><td class="sun">18</td></tr>
<tr><td class="mon">19</td><td class="tue">20</td><td class="wed">21</td><td class="thu">22</td><td class="fri">23</td><td class="sat">24</td><td class="sun">25</td></tr>
<tr><td class="mon">26</td><td class="tue">27</td><td class="wed">28</td><td class="thu">29</td><td class="fri">30</td><td class="sat">31</td><td class="noday">&nbsp;</td></tr>
</table>
</td><td><table border="0" cellpadding="0" cellspacing="0" class="{month}">
<tr><th colspan="7" class="{month}">February</th></tr>
<tr><th class="mon">Mon</th><th class="tue">Tue</th><th class="wed">Wed</th><th class="thu">Thu</th><th class="fri">Fri</th><th class="sat">Sat</th><th class="sun">Sun</th></tr>
<tr><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="sun">1</td></tr>
<tr><td class="mon">2</td><td class="tue">3</td><td class="wed">4</td><td class="thu">5</td><td class="fri">6</td><td class="sat">7</td><td class="sun">8</td></tr>
<tr><td class="mon">9</td><td class="tue">10</td><td class="wed">11</td><td class="thu">12</td><td class="fri">13</td><td class="sat">14</td><td class="sun">15</td></tr>
<tr><td class="mon">16</td><td class="tue">17</td><td class="wed">18</td><td class="thu">19</td><td class="fri">20</td><td class="sat">21</td><td class="sun">22</td></tr>
<tr><td class="mon">23</td><td class="tue">24</td><td class="wed">25</td><td class="thu">26</td><td class="fri">27</td><td class="sat">28</td><td class="sun">29</td></tr>
</table>
</td><td><table border="0" cellpadding="0" cellspacing="0" class="{month}">
<tr><th colspan="7" class="{month}">March</th></tr>
<tr><th class="mon">Mon</th><th class="tue">Tue</th><th class="wed">Wed</th><th class="thu">Thu</th><th class="fri">Fri</th><th class="sat">Sat</th><th class="sun">Sun</th></tr>
<tr><td class="mon">1</td><td class="tue">2</td><td class="wed">3</td><td class="thu">4</td><td class="fri">5</td><td class="sat">6</td><td class="sun">7</td></tr>
<tr><td class="mon">8</td><td class="tue">9</td><td class="wed">10</td><td class="thu">11</td><td class="fri">12</td><td class="sat">13</td><td class="sun">14</td></tr>
<tr><td class="mon">15</td><td class="tue">16</td><td class="wed">17</td><td class="thu">18</td><td class="fri">19</td><td class="sat">20</td><td class="sun">21</td></tr>
<tr><td class="mon">22</td><td class="tue">23</td><td class="wed">24</td><td class="thu">25</td><td class="fri">26</td><td class="sat">27</td><td class="sun">28</td></tr>
<tr><td class="mon">29</td><td class="tue">30</td><td class="wed">31</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td></tr>
</table>
</td></tr><tr><td><table border="0" cellpadding="0" cellspacing="0" class="{month}">
<tr><th colspan="7" class="{month}">April</th></tr>
<tr><th class="mon">Mon</th><th class="tue">Tue</th><th class="wed">Wed</th><th class="thu">Thu</th><th class="fri">Fri</th><th class="sat">Sat</th><th class="sun">Sun</th></tr>
<tr><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="thu">1</td><td class="fri">2</td><td class="sat">3</td><td class="sun">4</td></tr>
<tr><td class="mon">5</td><td class="tue">6</td><td class="wed">7</td><td class="thu">8</td><td class="fri">9</td><td class="sat">10</td><td class="sun">11</td></tr>
<tr><td class="mon">12</td><td class="tue">13</td><td class="wed">14</td><td class="thu">15</td><td class="fri">16</td><td class="sat">17</td><td class="sun">18</td></tr>
<tr><td class="mon">19</td><td class="tue">20</td><td class="wed">21</td><td class="thu">22</td><td class="fri">23</td><td class="sat">24</td><td class="sun">25</td></tr>
<tr><td class="mon">26</td><td class="tue">27</td><td class="wed">28</td><td class="thu">29</td><td class="fri">30</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td></tr>
</table>
</td><td><table border="0" cellpadding="0" cellspacing="0" class="{month}">
<tr><th colspan="7" class="{month}">May</th></tr>
<tr><th class="mon">Mon</th><th class="tue">Tue</th><th class="wed">Wed</th><th class="thu">Thu</th><th class="fri">Fri</th><th class="sat">Sat</th><th class="sun">Sun</th></tr>
<tr><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="sat">1</td><td class="sun">2</td></tr>
<tr><td class="mon">3</td><td class="tue">4</td><td class="wed">5</td><td class="thu">6</td><td class="fri">7</td><td class="sat">8</td><td class="sun">9</td></tr>
<tr><td class="mon">10</td><td class="tue">11</td><td class="wed">12</td><td class="thu">13</td><td class="fri">14</td><td class="sat">15</td><td class="sun">16</td></tr>
<tr><td class="mon">17</td><td class="tue">18</td><td class="wed">19</td><td class="thu">20</td><td class="fri">21</td><td class="sat">22</td><td class="sun">23</td></tr>
<tr><td class="mon">24</td><td class="tue">25</td><td class="wed">26</td><td class="thu">27</td><td class="fri">28</td><td class="sat">29</td><td class="sun">30</td></tr>
<tr><td class="mon">31</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td></tr>
</table>
</td><td><table border="0" cellpadding="0" cellspacing="0" class="{month}">
<tr><th colspan="7" class="{month}">June</th></tr>
<tr><th class="mon">Mon</th><th class="tue">Tue</th><th class="wed">Wed</th><th class="thu">Thu</th><th class="fri">Fri</th><th class="sat">Sat</th><th class="sun">Sun</th></tr>
<tr><td class="noday">&nbsp;</td><td class="tue">1</td><td class="wed">2</td><td class="thu">3</td><td class="fri">4</td><td class="sat">5</td><td class="sun">6</td></tr>
<tr><td class="mon">7</td><td class="tue">8</td><td class="wed">9</td><td class="thu">10</td><td class="fri">11</td><td class="sat">12</td><td class="sun">13</td></tr>
<tr><td class="mon">14</td><td class="tue">15</td><td class="wed">16</td><td class="thu">17</td><td class="fri">18</td><td class="sat">19</td><td class="sun">20</td></tr>
<tr><td class="mon">21</td><td class="tue">22</td><td class="wed">23</td><td class="thu">24</td><td class="fri">25</td><td class="sat">26</td><td class="sun">27</td></tr>
<tr><td class="mon">28</td><td class="tue">29</td><td class="wed">30</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td></tr>
</table>
</td></tr><tr><td><table border="0" cellpadding="0" cellspacing="0" class="{month}">
<tr><th colspan="7" class="{month}">July</th></tr>
<tr><th class="mon">Mon</th><th class="tue">Tue</th><th class="wed">Wed</th><th class="thu">Thu</th><th class="fri">Fri</th><th class="sat">Sat</th><th class="sun">Sun</th></tr>
<tr><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="thu">1</td><td class="fri">2</td><td class="sat">3</td><td class="sun">4</td></tr>
<tr><td class="mon">5</td><td class="tue">6</td><td class="wed">7</td><td class="thu">8</td><td class="fri">9</td><td class="sat">10</td><td class="sun">11</td></tr>
<tr><td class="mon">12</td><td class="tue">13</td><td class="wed">14</td><td class="thu">15</td><td class="fri">16</td><td class="sat">17</td><td class="sun">18</td></tr>
<tr><td class="mon">19</td><td class="tue">20</td><td class="wed">21</td><td class="thu">22</td><td class="fri">23</td><td class="sat">24</td><td class="sun">25</td></tr>
<tr><td class="mon">26</td><td class="tue">27</td><td class="wed">28</td><td class="thu">29</td><td class="fri">30</td><td class="sat">31</td><td class="noday">&nbsp;</td></tr>
</table>
</td><td><table border="0" cellpadding="0" cellspacing="0" class="{month}">
<tr><th colspan="7" class="{month}">August</th></tr>
<tr><th class="mon">Mon</th><th class="tue">Tue</th><th class="wed">Wed</th><th class="thu">Thu</th><th class="fri">Fri</th><th class="sat">Sat</th><th class="sun">Sun</th></tr>
<tr><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="sun">1</td></tr>
<tr><td class="mon">2</td><td class="tue">3</td><td class="wed">4</td><td class="thu">5</td><td class="fri">6</td><td class="sat">7</td><td class="sun">8</td></tr>
<tr><td class="mon">9</td><td class="tue">10</td><td class="wed">11</td><td class="thu">12</td><td class="fri">13</td><td class="sat">14</td><td class="sun">15</td></tr>
<tr><td class="mon">16</td><td class="tue">17</td><td class="wed">18</td><td class="thu">19</td><td class="fri">20</td><td class="sat">21</td><td class="sun">22</td></tr>
<tr><td class="mon">23</td><td class="tue">24</td><td class="wed">25</td><td class="thu">26</td><td class="fri">27</td><td class="sat">28</td><td class="sun">29</td></tr>
<tr><td class="mon">30</td><td class="tue">31</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td></tr>
</table>
</td><td><table border="0" cellpadding="0" cellspacing="0" class="{month}">
<tr><th colspan="7" class="{month}">September</th></tr>
<tr><th class="mon">Mon</th><th class="tue">Tue</th><th class="wed">Wed</th><th class="thu">Thu</th><th class="fri">Fri</th><th class="sat">Sat</th><th class="sun">Sun</th></tr>
<tr><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="wed">1</td><td class="thu">2</td><td class="fri">3</td><td class="sat">4</td><td class="sun">5</td></tr>
<tr><td class="mon">6</td><td class="tue">7</td><td class="wed">8</td><td class="thu">9</td><td class="fri">10</td><td class="sat">11</td><td class="sun">12</td></tr>
<tr><td class="mon">13</td><td class="tue">14</td><td class="wed">15</td><td class="thu">16</td><td class="fri">17</td><td class="sat">18</td><td class="sun">19</td></tr>
<tr><td class="mon">20</td><td class="tue">21</td><td class="wed">22</td><td class="thu">23</td><td class="fri">24</td><td class="sat">25</td><td class="sun">26</td></tr>
<tr><td class="mon">27</td><td class="tue">28</td><td class="wed">29</td><td class="thu">30</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td></tr>
</table>
</td></tr><tr><td><table border="0" cellpadding="0" cellspacing="0" class="{month}">
<tr><th colspan="7" class="{month}">October</th></tr>
<tr><th class="mon">Mon</th><th class="tue">Tue</th><th class="wed">Wed</th><th class="thu">Thu</th><th class="fri">Fri</th><th class="sat">Sat</th><th class="sun">Sun</th></tr>
<tr><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="fri">1</td><td class="sat">2</td><td class="sun">3</td></tr>
<tr><td class="mon">4</td><td class="tue">5</td><td class="wed">6</td><td class="thu">7</td><td class="fri">8</td><td class="sat">9</td><td class="sun">10</td></tr>
<tr><td class="mon">11</td><td class="tue">12</td><td class="wed">13</td><td class="thu">14</td><td class="fri">15</td><td class="sat">16</td><td class="sun">17</td></tr>
<tr><td class="mon">18</td><td class="tue">19</td><td class="wed">20</td><td class="thu">21</td><td class="fri">22</td><td class="sat">23</td><td class="sun">24</td></tr>
<tr><td class="mon">25</td><td class="tue">26</td><td class="wed">27</td><td class="thu">28</td><td class="fri">29</td><td class="sat">30</td><td class="sun">31</td></tr>
</table>
</td><td><table border="0" cellpadding="0" cellspacing="0" class="{month}">
<tr><th colspan="7" class="{month}">November</th></tr>
<tr><th class="mon">Mon</th><th class="tue">Tue</th><th class="wed">Wed</th><th class="thu">Thu</th><th class="fri">Fri</th><th class="sat">Sat</th><th class="sun">Sun</th></tr>
<tr><td class="mon">1</td><td class="tue">2</td><td class="wed">3</td><td class="thu">4</td><td class="fri">5</td><td class="sat">6</td><td class="sun">7</td></tr>
<tr><td class="mon">8</td><td class="tue">9</td><td class="wed">10</td><td class="thu">11</td><td class="fri">12</td><td class="sat">13</td><td class="sun">14</td></tr>
<tr><td class="mon">15</td><td class="tue">16</td><td class="wed">17</td><td class="thu">18</td><td class="fri">19</td><td class="sat">20</td><td class="sun">21</td></tr>
<tr><td class="mon">22</td><td class="tue">23</td><td class="wed">24</td><td class="thu">25</td><td class="fri">26</td><td class="sat">27</td><td class="sun">28</td></tr>
<tr><td class="mon">29</td><td class="tue">30</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td></tr>
</table>
</td><td><table border="0" cellpadding="0" cellspacing="0" class="{month}">
<tr><th colspan="7" class="{month}">December</th></tr>
<tr><th class="mon">Mon</th><th class="tue">Tue</th><th class="wed">Wed</th><th class="thu">Thu</th><th class="fri">Fri</th><th class="sat">Sat</th><th class="sun">Sun</th></tr>
<tr><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td><td class="wed">1</td><td class="thu">2</td><td class="fri">3</td><td class="sat">4</td><td class="sun">5</td></tr>
<tr><td class="mon">6</td><td class="tue">7</td><td class="wed">8</td><td class="thu">9</td><td class="fri">10</td><td class="sat">11</td><td class="sun">12</td></tr>
<tr><td class="mon">13</td><td class="tue">14</td><td class="wed">15</td><td class="thu">16</td><td class="fri">17</td><td class="sat">18</td><td class="sun">19</td></tr>
<tr><td class="mon">20</td><td class="tue">21</td><td class="wed">22</td><td class="thu">23</td><td class="fri">24</td><td class="sat">25</td><td class="sun">26</td></tr>
<tr><td class="mon">27</td><td class="tue">28</td><td class="wed">29</td><td class="thu">30</td><td class="fri">31</td><td class="noday">&nbsp;</td><td class="noday">&nbsp;</td></tr>
</table>
</td></tr></table></body>
</html>
é   é   é   é   é   é   é   é   é	   é
   é   é   é   é   é   é   é   é   é   é   é   é   é   é   é   é   é   é   é   é   é   z>12/29/03 12/30/03 12/31/03 01/01/04 01/02/04 01/03/04 01/04/04z>01/05/04 01/06/04 01/07/04 01/08/04 01/09/04 01/10/04 01/11/04z>01/12/04 01/13/04 01/14/04 01/15/04 01/16/04 01/17/04 01/18/04z>01/19/04 01/20/04 01/21/04 01/22/04 01/23/04 01/24/04 01/25/04z>01/26/04 01/27/04 01/28/04 01/29/04 01/30/04 01/31/04 02/01/04z>02/02/04 02/03/04 02/04/04 02/05/04 02/06/04 02/07/04 02/08/04z>02/09/04 02/10/04 02/11/04 02/12/04 02/13/04 02/14/04 02/15/04z>02/16/04 02/17/04 02/18/04 02/19/04 02/20/04 02/21/04 02/22/04z>02/23/04 02/24/04 02/25/04 02/26/04 02/27/04 02/28/04 02/29/04z>03/01/04 03/02/04 03/03/04 03/04/04 03/05/04 03/06/04 03/07/04z>03/08/04 03/09/04 03/10/04 03/11/04 03/12/04 03/13/04 03/14/04z>03/15/04 03/16/04 03/17/04 03/18/04 03/19/04 03/20/04 03/21/04z>03/22/04 03/23/04 03/24/04 03/25/04 03/26/04 03/27/04 03/28/04z>03/29/04 03/30/04 03/31/04 04/01/04 04/02/04 04/03/04 04/04/04z>04/05/04 04/06/04 04/07/04 04/08/04 04/09/04 04/10/04 04/11/04z>04/12/04 04/13/04 04/14/04 04/15/04 04/16/04 04/17/04 04/18/04z>04/19/04 04/20/04 04/21/04 04/22/04 04/23/04 04/24/04 04/25/04z>04/26/04 04/27/04 04/28/04 04/29/04 04/30/04 05/01/04 05/02/04z>05/03/04 05/04/04 05/05/04 05/06/04 05/07/04 05/08/04 05/09/04z>05/10/04 05/11/04 05/12/04 05/13/04 05/14/04 05/15/04 05/16/04z>05/17/04 05/18/04 05/19/04 05/20/04 05/21/04 05/22/04 05/23/04z>05/24/04 05/25/04 05/26/04 05/27/04 05/28/04 05/29/04 05/30/04z>05/31/04 06/01/04 06/02/04 06/03/04 06/04/04 06/05/04 06/06/04z>06/07/04 06/08/04 06/09/04 06/10/04 06/11/04 06/12/04 06/13/04z>06/14/04 06/15/04 06/16/04 06/17/04 06/18/04 06/19/04 06/20/04z>06/21/04 06/22/04 06/23/04 06/24/04 06/25/04 06/26/04 06/27/04z>06/28/04 06/29/04 06/30/04 07/01/04 07/02/04 07/03/04 07/04/04z>07/05/04 07/06/04 07/07/04 07/08/04 07/09/04 07/10/04 07/11/04z>07/12/04 07/13/04 07/14/04 07/15/04 07/16/04 07/17/04 07/18/04z>07/19/04 07/20/04 07/21/04 07/22/04 07/23/04 07/24/04 07/25/04z>07/26/04 07/27/04 07/28/04 07/29/04 07/30/04 07/31/04 08/01/04z>08/02/04 08/03/04 08/04/04 08/05/04 08/06/04 08/07/04 08/08/04z>08/09/04 08/10/04 08/11/04 08/12/04 08/13/04 08/14/04 08/15/04z>08/16/04 08/17/04 08/18/04 08/19/04 08/20/04 08/21/04 08/22/04z>08/23/04 08/24/04 08/25/04 08/26/04 08/27/04 08/28/04 08/29/04z>08/30/04 08/31/04 09/01/04 09/02/04 09/03/04 09/04/04 09/05/04z>09/06/04 09/07/04 09/08/04 09/09/04 09/10/04 09/11/04 09/12/04z>09/13/04 09/14/04 09/15/04 09/16/04 09/17/04 09/18/04 09/19/04z>09/20/04 09/21/04 09/22/04 09/23/04 09/24/04 09/25/04 09/26/04z>09/27/04 09/28/04 09/29/04 09/30/04 10/01/04 10/02/04 10/03/04z>10/04/04 10/05/04 10/06/04 10/07/04 10/08/04 10/09/04 10/10/04z>10/11/04 10/12/04 10/13/04 10/14/04 10/15/04 10/16/04 10/17/04z>10/18/04 10/19/04 10/20/04 10/21/04 10/22/04 10/23/04 10/24/04z>10/25/04 10/26/04 10/27/04 10/28/04 10/29/04 10/30/04 10/31/04z>11/01/04 11/02/04 11/03/04 11/04/04 11/05/04 11/06/04 11/07/04z>11/08/04 11/09/04 11/10/04 11/11/04 11/12/04 11/13/04 11/14/04z>11/15/04 11/16/04 11/17/04 11/18/04 11/19/04 11/20/04 11/21/04z>11/22/04 11/23/04 11/24/04 11/25/04 11/26/04 11/27/04 11/28/04z>11/29/04 11/30/04 12/01/04 12/02/04 12/03/04 12/04/04 12/05/04z>12/06/04 12/07/04 12/08/04 12/09/04 12/10/04 12/11/04 12/12/04z>12/13/04 12/14/04 12/15/04 12/16/04 12/17/04 12/18/04 12/19/04z>12/20/04 12/21/04 12/22/04 12/23/04 12/24/04 12/25/04 12/26/04z>12/27/04 12/28/04 12/29/04 12/30/04 12/31/04 01/01/05 01/02/05c               @   sœ   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd „ Zd!d"„ Zd#d$„ Zd%S )&ÚOutputTestCasec             C   s>   dd„ }g }x,|j ddD ]}|rt||ƒs| |¡ qW |S )Nc             S   s   |   ¡  o|  ¡  S )N)ÚisspaceÚisdigit)Úc© r,   ú#/usr/lib/python3.7/test_calendar.pyÚneitherspacenordigits  s    z?OutputTestCase.normalize_calendar.<locals>.neitherspacenordigitF)Úkeepends)Ú
splitlinesÚfilterÚappend)ÚselfÚsr.   ÚlinesÚliner,   r,   r-   Únormalize_calendarq  s    z!OutputTestCase.normalize_calendarc             C   sH   t  ¡ }t ¡ }|pd|d< |jd|d}|  |tjf |Ž |¡¡ d S )Nzutf-8r   iÔ  )r   )	ÚcalendarÚHTMLCalendarÚdefault_formatÚcopyZformatyearpageÚassertEqualÚresult_2004_htmlÚformatÚencode)r3   ZreqZresÚcalZformat_Úoutputr,   r,   r-   Úcheck_htmlcalendar_encoding}  s    z*OutputTestCase.check_htmlcalendar_encodingc             C   s@   |   |  t d¡¡|  t¡¡ |   |  t d¡¡|  t¡¡ d S )NiÔ  r   )r<   r7   r8   Úresult_2004_textÚresult_0_text)r3   r,   r,   r-   Útest_output‡  s    zOutputTestCase.test_outputc             C   s0   |   t ¡  d¡t¡ |   t ¡  d¡t¡ d S )NiÔ  r   )r<   r8   ÚTextCalendarÚ
formatyearrC   rD   )r3   r,   r,   r-   Útest_output_textcalendar‘  s    z'OutputTestCase.test_output_textcalendarc             C   s   |   dd¡ d S )Nr   )rB   )r3   r,   r,   r-   Ú'test_output_htmlcalendar_encoding_ascii›  s    z6OutputTestCase.test_output_htmlcalendar_encoding_asciic             C   s   |   dd¡ d S )Nzutf-8)rB   )r3   r,   r,   r-   Ú&test_output_htmlcalendar_encoding_utf8ž  s    z5OutputTestCase.test_output_htmlcalendar_encoding_utf8c             C   s   |   d t ¡ ¡ d S )N)rB   ÚsysÚgetdefaultencoding)r3   r,   r,   r-   Ú)test_output_htmlcalendar_encoding_default¡  s    z8OutputTestCase.test_output_htmlcalendar_encoding_defaultc             C   s&   dd„ }|   |t ¡  d¡ƒt¡ d S )Nc             S   s   dd„ | D ƒS )Nc             S   s   g | ]}d d„ |D ƒ‘qS )c             S   s   g | ]}d d„ |D ƒ‘qS )c             S   s    g | ]}d   dd„ |D ƒ¡‘qS )ú c             s   s.   | ]&}d   |j|jt|jƒdd… ¡V  qdS )z{:02d}/{:02d}/{}éþÿÿÿN)r>   r   ÚdayÚstrr   )Ú.0Údr,   r,   r-   ú	<genexpr>¦  s   ziOutputTestCase.test_yeardatescalendar.<locals>.shrink.<locals>.<listcomp>.<listcomp>.<listcomp>.<genexpr>)Újoin)rR   Úzr,   r,   r-   ú
<listcomp>¦  s   z_OutputTestCase.test_yeardatescalendar.<locals>.shrink.<locals>.<listcomp>.<listcomp>.<listcomp>r,   )rR   Úyr,   r,   r-   rW   ¦  s   zTOutputTestCase.test_yeardatescalendar.<locals>.shrink.<locals>.<listcomp>.<listcomp>r,   )rR   Úxr,   r,   r-   rW   ¦  s   zIOutputTestCase.test_yeardatescalendar.<locals>.shrink.<locals>.<listcomp>r,   )r@   r,   r,   r-   Úshrink¥  s    z5OutputTestCase.test_yeardatescalendar.<locals>.shrinkiÔ  )r<   r8   ÚCalendarZyeardatescalendarÚresult_2004_dates)r3   rZ   r,   r,   r-   Útest_yeardatescalendar¤  s    z%OutputTestCase.test_yeardatescalendarc             C   s   |   t ¡  d¡t¡ d S )NiÔ  )r<   r8   r[   ZyeardayscalendarÚresult_2004_days)r3   r,   r,   r-   Útest_yeardayscalendar®  s    z$OutputTestCase.test_yeardayscalendarc             C   s   |   t ¡  d¡d¡ d S )Nr
   zMo Tu We Th Fr Sa Su)r<   r8   rF   Úformatweekheader)r3   r,   r,   r-   Útest_formatweekheader_short´  s    z*OutputTestCase.test_formatweekheader_shortc             C   s   |   t ¡  d¡d¡ d S )Nr   zE  Monday   Tuesday  Wednesday  Thursday   Friday   Saturday   Sunday )r<   r8   rF   r`   )r3   r,   r,   r-   Útest_formatweekheader_longº  s    z)OutputTestCase.test_formatweekheader_longc             C   s4   |   t ¡  dd¡t¡ |   t ¡  dd¡t¡ d S )NiÔ  r	   r   r
   )r<   r8   rF   ÚformatmonthÚresult_2004_01_textÚresult_0_02_text)r3   r,   r,   r-   Útest_formatmonthÁ  s    zOutputTestCase.test_formatmonthc             C   s    |   t ¡ jddddd¡ d S )NiÔ  r	   T)Úwithyearz8<tr><th colspan="7" class="month">January 2004</th></tr>)r<   r8   r9   Úformatmonthname)r3   r,   r,   r-   Útest_formatmonthname_with_yearË  s    z-OutputTestCase.test_formatmonthname_with_yearc             C   s    |   t ¡ jddddd¡ d S )NiÔ  r	   F)rg   z3<tr><th colspan="7" class="month">January</th></tr>)r<   r8   r9   rh   )r3   r,   r,   r-   Ú!test_formatmonthname_without_yearÑ  s    z0OutputTestCase.test_formatmonthname_without_yearc          	   C   sJ   t  ¡ 8}dddddddg}t ¡  |d¡ |  | ¡ d	¡ W d Q R X d S )
N)r	   r   )r
   r	   )r   r
   )r   r   )r   r   )r   r   )r   r   r	   z 1  2  3  4  5  6  7)r   Úcaptured_stdoutr8   rF   Úprweekr<   Úgetvalue)r3   ÚoutÚweekr,   r,   r-   Útest_prweek×  s    
zOutputTestCase.test_prweekc          	   C   s8   t  ¡ &}t ¡  dd¡ |  | ¡ t¡ W d Q R X d S )NiÔ  r	   )r   rk   r8   rF   Zprmonthr<   rm   rd   )r3   rn   r,   r,   r-   Útest_prmonthÝ  s    
zOutputTestCase.test_prmonthc          	   C   s6   t  ¡ $}t ¡  d¡ |  | ¡ t¡ W d Q R X d S )NiÔ  )r   rk   r8   rF   Zpryearr<   rm   rC   )r3   rn   r,   r,   r-   Útest_pryearâ  s    
zOutputTestCase.test_pryearc          	   C   sB   t  ¡ 0}tjdddgddd |  | ¡  ¡ d¡ W d Q R X d S )NÚ1Ú2Ú3r   r	   )ZcolwidthZspacingz	1   2   3)r   rk   r8   r>   r<   rm   Ústrip)r3   rn   r,   r,   r-   Útest_formatç  s    
zOutputTestCase.test_formatN)Ú__name__Ú
__module__Ú__qualname__r7   rB   rE   rH   rI   rJ   rM   r]   r_   ra   rb   rf   ri   rj   rp   rq   rr   rw   r,   r,   r,   r-   r(   p  s$   




r(   c               @   sd   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ ZdS )ÚCalendarTestCasec             C   sL   |   t d¡d¡ |   t d¡d¡ |   t d¡d¡ |   t d¡d¡ d S )NiÐ  r	   iÑ  r   iÒ  iÓ  )r<   r8   Zisleap)r3   r,   r,   r-   Útest_isleapí  s    zCalendarTestCase.test_isleapc             C   s‚   |   ttjd¡ |   ttjd¡ |   ttjd¡ t ¡ }t tj¡ |  t ¡ tj¡ t tj¡ |  t ¡ tj¡ t |¡ d S )NZflabberéÿÿÿÿéÈ   )	ÚassertRaisesÚ	TypeErrorr8   ÚsetfirstweekdayÚ
ValueErrorÚfirstweekdayÚSUNDAYr<   ÚMONDAY)r3   Zorigr,   r,   r-   Útest_setfirstweekday÷  s    z%CalendarTestCase.test_setfirstweekdayc          	   C   s(   |   tjd¡ t d¡ W d Q R X d S )NZ123é{   )ÚassertRaisesRegexr8   ZIllegalWeekdayErrorr   )r3   r,   r,   r-   Útest_illegal_weekday_reported  s    z.CalendarTestCase.test_illegal_weekday_reportedc             C   sD   |   ttjjd¡ |   ttjjd¡ |  tdd„ tjD ƒƒd¡ d S )Niöÿÿÿr   c             S   s   g | ]}|‘qS r,   r,   )rR   rS   r,   r,   r-   rW   	  s    z<CalendarTestCase.test_enumerate_weekdays.<locals>.<listcomp>r   )r   Ú
IndexErrorr8   Úday_abbrÚ__getitem__Úday_namer<   Úlen)r3   r,   r,   r-   Útest_enumerate_weekdays  s    z(CalendarTestCase.test_enumerate_weekdaysc             C   sv   xpdD ]h}t t|ƒ}|  t|ƒd¡ |  t|d d … ƒd¡ |  tt|ƒƒd¡ |  |d d d… tt|ƒƒ¡ qW d S )N)r   r‹   r   r}   )Úgetattrr8   r<   rŽ   ÚsetÚlistÚreversed)r3   ÚattrÚvaluer,   r,   r-   Ú	test_days  s    

zCalendarTestCase.test_daysc             C   s†   x€dD ]x}t t|ƒ}|  t|ƒd¡ |  t|d d … ƒd¡ |  |d d¡ |  tt|ƒƒd¡ |  |d d d… tt|ƒƒ¡ qW d S )N)Z
month_nameZ
month_abbrr   r   Ú r}   )r   r8   r<   rŽ   r‘   r’   r“   )r3   r”   r•   r,   r,   r-   Útest_months  s    

zCalendarTestCase.test_monthsc             C   sò   t  ¡  ddd¡}y*t jdd}| dd¡}| ddd¡}W n  tjk
r\   t d¡‚Y nX |  	|t
¡ |  	|t
¡ |  t|ƒd¡ |  t|ƒd¡ t jdd}| d¡}| dd¡}|  	|t
¡ |  	|t
¡ t  ¡  ddd¡}|  ||¡ d S )NiÚ  r   r—   )Úlocaler	   z$cannot set the system default locale)r8   rF   rh   ZLocaleTextCalendarZformatweekdayr™   ÚErrorÚunittestZSkipTestZassertIsInstancerQ   r<   rŽ   ZassertGreaterEqualZLocaleHTMLCalendar)r3   Zold_octoberr@   Zlocal_weekdayZlocal_monthZnew_octoberr,   r,   r-   Útest_locale_calendars   s$    
z&CalendarTestCase.test_locale_calendarsc             C   s   t t ¡  tjd¡ƒ d S )Nr   )r’   r8   r[   Zitermonthdays3ÚdatetimeZMAXYEAR)r3   r,   r,   r-   Útest_itermonthdays37  s    z$CalendarTestCase.test_itermonthdays3c             C   s@   t jdd}t| dd¡ƒ}|  |d d¡ |  |d d¡ d S )	Nr   )rƒ   iÑ  r
   r   )iÑ  r
   r	   r   r}   )iÑ  r
   r$   r
   )r8   r[   r’   Zitermonthdays4r<   )r3   r@   Údaysr,   r,   r-   Útest_itermonthdays4;  s    z$CalendarTestCase.test_itermonthdays4c             C   s„   xLt dƒD ]@}t |¡}x0dD ](\}}t| ||¡ƒ}|  t|ƒd¡ qW q
W tjdd}t| dd¡ƒ}|  |tt dd	ƒƒ¡ d S )
Nr   ))r	   r	   )i'  r   )é#   é*   r   )rƒ   iÑ  r
   r	   r%   )Úranger8   r[   r’   ZitermonthdaysÚassertInrŽ   r<   )r3   rƒ   r@   rX   ÚmrŸ   r,   r,   r-   Útest_itermonthdaysA  s    
z#CalendarTestCase.test_itermonthdaysc             C   sr   xlt dƒD ]`}t |¡}xPdD ]H\}}t| ||¡ƒ}|  |d d |¡ |  |d d |d d ¡ qW q
W d S )Nr   ))r	   r	   )i'  r   r   r	   r}   )r£   r8   r[   r’   Zitermonthdays2r<   )r3   rƒ   r@   rX   r¥   rŸ   r,   r,   r-   Útest_itermonthdays2M  s    
z$CalendarTestCase.test_itermonthdays2N)rx   ry   rz   r|   r†   r‰   r   r–   r˜   rœ   rž   r    r¦   r§   r,   r,   r,   r-   r{   ì  s   

r{   c               @   s$   e Zd Zdd„ Zdd„ Zdd„ ZdS )ÚMonthCalendarTestCasec             C   s   t  ¡ | _t  | j¡ d S )N)r8   rƒ   Úoldfirstweekdayr   )r3   r,   r,   r-   ÚsetUpX  s    
zMonthCalendarTestCase.setUpc             C   s   t  | j¡ d S )N)r8   r   r©   )r3   r,   r,   r-   ÚtearDown\  s    zMonthCalendarTestCase.tearDownc             C   s\   t  ||¡}|  t|ƒt|ƒ¡ x6tt|ƒƒD ]&}|  || tdd„ || D ƒƒ¡ q.W d S )Nc             s   s   | ]}|d kV  qdS )r   Nr,   )rR   rP   r,   r,   r-   rT   c  s    z4MonthCalendarTestCase.check_weeks.<locals>.<genexpr>)r8   Zmonthcalendarr<   rŽ   r£   Úsum)r3   r   r   Úweeksr@   Úir,   r,   r-   Úcheck_weeks_  s    z!MonthCalendarTestCase.check_weeksN)rx   ry   rz   rª   r«   r¯   r,   r,   r,   r-   r¨   W  s   r¨   c               @   s*   e Zd ZejZdd„ Zdd„ Zdd„ ZdS )ÚMondayTestCasec             C   sX   |   ddd¡ |   ddd¡ |   ddd¡ |   ddd	¡ |   d
dd¡ |   ddd¡ d S )NiÏ  r
   )r   r   r   r   iÕ  )r   r   r   r   r	   iÃ  )r	   r   r   r   r   iÄ  )r   r   r   r   r	   i´  )r   r   r   r   r
   iÔ  )r	   r   r   r   r   )r¯   )r3   r,   r,   r-   Útest_februaryi  s    zMondayTestCase.test_februaryc             C   sJ   |   ddd¡ |   ddd¡ |   ddd¡ |   ddd	¡ |   d
dd¡ d S )Ni  r   )r   r   r   r   r
   i·  )r   r   r   r   r   i™  )r	   r   r   r   r   r	   iË  )r
   r   r   r   r   iÊ  )r   r   r   r   r   )r¯   )r3   r,   r,   r-   Ú
test_april|  s
    zMondayTestCase.test_aprilc             C   sX   |   ddd¡ |   ddd¡ |   ddd¡ |   ddd	¡ |   d
dd¡ |   ddd¡ d S )Ni¼  r   )r   r   r   r   r   iÃ  )r   r   r   r   r   i°  )r	   r   r   r   r   r
   iÄ  )r   r   r   r   r   iá  )r   r   r   r   r   i  )r
   r   r   r   r   r	   )r¯   )r3   r,   r,   r-   Útest_decemberŒ  s    zMondayTestCase.test_decemberN)	rx   ry   rz   r8   r…   rƒ   r±   r²   r³   r,   r,   r,   r-   r°   f  s   r°   c               @   s*   e Zd ZejZdd„ Zdd„ Zdd„ ZdS )ÚSundayTestCasec             C   sX   |   ddd¡ |   ddd¡ |   ddd¡ |   ddd	¡ |   d
dd¡ |   ddd¡ d S )NiÙ  r
   )r   r   r   r   iÏ  )r   r   r   r   r	   iÍ  )r	   r   r   r   r   iÔ  )r   r   r   r   r	   i¨  )r   r   r   r   r
   i¬  )r	   r   r   r   r   )r¯   )r3   r,   r,   r-   r±   £  s    zSundayTestCase.test_februaryc             C   sJ   |   ddd¡ |   ddd¡ |   ddd¡ |   ddd	¡ |   d
dd¡ d S )Niƒ  r   )r   r   r   r   r
   i~  )r   r   r   r   r   iž  )r	   r   r   r   r   r	   i¨  )r
   r   r   r   r   iu  )r   r   r   r   r   )r¯   )r3   r,   r,   r-   r²   ¶  s
    zSundayTestCase.test_aprilc             C   sX   |   ddd¡ |   ddd¡ |   ddd¡ |   ddd	¡ |   d
dd¡ |   ddd¡ d S )Ni   r   )r   r   r   r   r   i•  )r   r   r   r   r   iƒ  )r	   r   r   r   r   r
   iœ  )r   r   r   r   r   i‡  )r   r   r   r   r   iË  )r
   r   r   r   r   r	   )r¯   )r3   r,   r,   r-   r³   Æ  s    zSundayTestCase.test_decemberN)	rx   ry   rz   r8   r„   rƒ   r±   r²   r³   r,   r,   r,   r-   r´      s   r´   c            
   @   s,   e Zd Zddddddddd	d
g
Zdd„ ZdS )ÚTimegmTestCaser   r   éd   iè  i'  i † i@B iÒ–Ii ;=KiÁï
Lc             C   s0   x*| j D ] }t |¡}|  |t |¡¡ qW d S )N)Ú
TIMESTAMPSÚtimeZgmtimer<   r8   Ztimegm)r3   ZsecsÚtupler,   r,   r-   Útest_timegmÜ  s    
zTimegmTestCase.test_timegmN)rx   ry   rz   r·   rº   r,   r,   r,   r-   rµ   Ù  s   
rµ   c               @   sD   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dS )ÚMonthRangeTestCasec             C   s   |   t dd¡d¡ d S )NiÔ  r	   )r   r'   )r<   r8   Ú
monthrange)r3   r,   r,   r-   Útest_januaryâ  s    zMonthRangeTestCase.test_januaryc             C   s   |   t dd¡d¡ d S )NiÔ  r
   )r   r%   )r<   r8   r¼   )r3   r,   r,   r-   Útest_february_leapæ  s    z%MonthRangeTestCase.test_february_leapc             C   s   |   t dd¡d¡ d S )NiÚ  r
   )r   r$   )r<   r8   r¼   )r3   r,   r,   r-   Útest_february_nonleapê  s    z(MonthRangeTestCase.test_february_nonleapc             C   s   |   t dd¡d¡ d S )NiÔ  r   )r
   r'   )r<   r8   r¼   )r3   r,   r,   r-   r³   î  s    z MonthRangeTestCase.test_decemberc          	   C   s(   |   tj¡ t dd¡ W d Q R X d S )NiÔ  r   )r   r8   ÚIllegalMonthErrorr¼   )r3   r,   r,   r-   Útest_zeroth_monthò  s    z$MonthRangeTestCase.test_zeroth_monthc          	   C   s(   |   tj¡ t dd¡ W d Q R X d S )NiÔ  r   )r   r8   rÀ   r¼   )r3   r,   r,   r-   Útest_thirteenth_month÷  s    z(MonthRangeTestCase.test_thirteenth_monthc          	   C   s*   |   tjd¡ t dd¡ W d Q R X d S )NZ65iÔ  éA   )rˆ   r8   rÀ   r¼   )r3   r,   r,   r-   Útest_illegal_month_reportedü  s    z.MonthRangeTestCase.test_illegal_month_reportedN)
rx   ry   rz   r½   r¾   r¿   r³   rÁ   rÂ   rÄ   r,   r,   r,   r-   r»   á  s   r»   c               @   s4   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ ZdS )ÚLeapdaysTestCasec             C   s   |   t dd¡d¡ d S )NiÚ  r   )r<   r8   Úleapdays)r3   r,   r,   r-   Útest_no_range  s    zLeapdaysTestCase.test_no_rangec             C   s   |   t dd¡d¡ d S )NiÚ  iÛ  r   )r<   r8   rÆ   )r3   r,   r,   r-   Útest_no_leapdays  s    z!LeapdaysTestCase.test_no_leapdaysc             C   s   |   t dd¡d¡ d S )NiÚ  iÜ  r   )r<   r8   rÆ   )r3   r,   r,   r-   Útest_no_leapdays_upper_boundary	  s    z0LeapdaysTestCase.test_no_leapdays_upper_boundaryc             C   s   |   t dd¡d¡ d S )NiÜ  iÝ  r	   )r<   r8   rÆ   )r3   r,   r,   r-   Útest_one_leapday_lower_boundary  s    z0LeapdaysTestCase.test_one_leapday_lower_boundaryc             C   s   |   t dd¡d¡ d S )NiÍ  iä  r   )r<   r8   rÆ   )r3   r,   r,   r-   Útest_several_leapyears_in_range  s    z0LeapdaysTestCase.test_several_leapyears_in_rangeN)rx   ry   rz   rÇ   rÈ   rÉ   rÊ   rË   r,   r,   r,   r-   rÅ      s
   rÅ   c             C   s   |   dtj¡ ¡ S )NÚ
)ÚreplaceÚosÚlinesepr?   )r4   r,   r,   r-   Úconv  s    rÐ   c               @   s”   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd „ Zd!d"„ Zd#S )$ÚCommandLineTestCasec             G   s   t d|žŽ d S )Nú-mr8   r	   )rÒ   r8   )r   )r3   Úargsr,   r,   r-   Úrun_ok  s    zCommandLineTestCase.run_okc             G   s.   t d|žŽ \}}}|  d|¡ |  |d¡ d S )Nú-mr8   s   usage:r
   )rÕ   r8   )r   r¤   r<   )r3   rÓ   ZrcÚstdoutÚstderrr,   r,   r-   ÚassertFailure  s    z!CommandLineTestCase.assertFailurec             C   s2   |   d¡}|  d|¡ |  d|¡ |  d|¡ d S )Nz-hs   usage:s   calendar.pys   --help)rÔ   r¤   )r3   rÖ   r,   r,   r-   Ú	test_help!  s    
zCommandLineTestCase.test_helpc             C   s4   |   d¡ |   d¡ |   dd¡ |   dddd¡ d S )Nz-zÚspamÚ2004z-tÚhtmlrs   )rØ   )r3   r,   r,   r-   Útest_illegal_arguments'  s    

z*CommandLineTestCase.test_illegal_argumentsc             C   sD   |   ¡ }tj ¡ j}|  d|  ¡ |¡ |  d|¡ |  d|¡ d S )Nz %ss   Januarys   Mo Tu We Th Fr Sa Su)rÔ   r   Únowr   r¤   r?   )r3   rÖ   r   r,   r,   r-   Útest_output_current_year-  s
    z,CommandLineTestCase.test_output_current_yearc             C   s   |   d¡}|  |ttƒ¡ d S )NrÛ   )rÔ   r<   rÐ   rC   )r3   rÖ   r,   r,   r-   Útest_output_year4  s    
z$CommandLineTestCase.test_output_yearc             C   s    |   dd¡}|  |ttƒ¡ d S )NrÛ   rs   )rÔ   r<   rÐ   rd   )r3   rÖ   r,   r,   r-   Útest_output_month8  s    z%CommandLineTestCase.test_output_monthc             C   s8   |   d¡ |   d¡ |  ddd¡}|  |t d¡¡ d S )Nz-ez
--encodingz	utf-16-lerÛ   )rØ   rÔ   r<   rC   r?   )r3   rÖ   r,   r,   r-   Útest_option_encoding<  s    

z(CommandLineTestCase.test_option_encodingc          
   C   sÂ   |   d¡ |   d¡ |   dd¡ t ¡ \}}|p2d}|p:d}y8t tj¡}zt tj||f¡ W d t tj|¡ X W n$ tjtfk
r˜   |  d¡ Y nX |  	d|d|d¡}|  
d |¡|¡ d S )	Nz-Lz--localeÚenÚCzUTF-8z$cannot set the system default localez
--encodingrÛ   )rØ   r™   ÚgetdefaultlocaleÚ	getlocaleÚLC_TIMEÚ	setlocalerš   r‚   ZskipTestrÔ   r¤   r?   )r3   ÚlangÚencZ	oldlocalerÖ   r,   r,   r-   Útest_option_localeB  s    

z&CommandLineTestCase.test_option_localec             C   s>   |   d¡ |   d¡ |   dd¡ |  ddd¡}|  d|¡ d S )Nz-wz--widthrÚ   ru   rÛ   s   Mon Tue Wed Thu Fri Sat Sun)rØ   rÔ   r¤   )r3   rÖ   r,   r,   r-   Útest_option_widthT  s
    

z%CommandLineTestCase.test_option_widthc             C   sB   |   d¡ |   d¡ |   dd¡ |  ddd¡}|  tdƒ|¡ d S )Nz-lz--linesrÚ   rt   rÛ   zDecember

Mo Tu We)rØ   rÔ   r¤   rÐ   )r3   rÖ   r,   r,   r-   Útest_option_lines[  s
    

z%CommandLineTestCase.test_option_linesc             C   s>   |   d¡ |   d¡ |   dd¡ |  ddd¡}|  d|¡ d S )Nz-sz	--spacingrÚ   Ú8rÛ   s   Su        Mo)rØ   rÔ   r¤   )r3   rÖ   r,   r,   r-   Útest_option_spacingb  s
    

z'CommandLineTestCase.test_option_spacingc             C   sB   |   d¡ |   d¡ |   dd¡ |  ddd¡}|  tdƒ|¡ d S )Nz-mz--monthrÚ   z--monthsrs   rÛ   z
Mo Tu We Th Fr Sa Su
)rØ   rÔ   r¤   rÐ   )r3   rÖ   r,   r,   r-   Útest_option_monthsi  s
    

z&CommandLineTestCase.test_option_monthsc             C   sp   |   d¡ |   d¡ |   dd¡ |  ddd¡}|  |ttƒ¡ |  ddd¡}|  |d d… d¡ |  d	|¡ d S )
Nz-tz--typerÚ   ÚtextrÛ   rÜ   r   s   <?xml s    <title>Calendar for 2004</title>)rØ   rÔ   r<   rÐ   rC   r¤   )r3   rÖ   r,   r,   r-   Útest_option_typep  s    

z$CommandLineTestCase.test_option_typec             C   s<   |   dd¡}tj ¡ j}|  d|  ¡ |¡ |  d|¡ d S )Nz--typerÜ   z<title>Calendar for %s</title>s3   <tr><th colspan="7" class="month">January</th></tr>)rÔ   r   rÞ   r   r¤   r?   )r3   rÖ   r   r,   r,   r-   Útest_html_output_current_yearz  s    z1CommandLineTestCase.test_html_output_current_yearc             C   s0   |   ddddd¡}|  |tjf tŽ d¡¡ d S )Nz-trÜ   z
--encodingr   rÛ   )rÔ   r<   r=   r>   r:   r?   )r3   rÖ   r,   r,   r-   Útest_html_output_year_encoding‚  s    z2CommandLineTestCase.test_html_output_year_encodingc             C   s>   |   ddd¡ |   ddd¡ |  ddddd¡}|  d|¡ d S )Nz-trÜ   z-cz--cssz
custom.cssrÛ   s;   <link rel="stylesheet" type="text/css" href="custom.css" />)rØ   rÔ   r¤   )r3   rÖ   r,   r,   r-   Útest_html_output_year_css‡  s
    z-CommandLineTestCase.test_html_output_year_cssN)rx   ry   rz   rÔ   rØ   rÙ   rÝ   rß   rà   rá   râ   rë   rì   rí   rï   rð   rò   ró   rô   rõ   r,   r,   r,   r-   rÑ     s"   
rÑ   c               @   s   e Zd Zdd„ ZdS )ÚMiscTestCasec             C   sB   ddddddddd	d
dddddddddddh}t j| t|d d S )NZmdaysZJanuaryZFebruaryZEPOCHr…   ZTUESDAYZ	WEDNESDAYZTHURSDAYZFRIDAYZSATURDAYr„   Zdifferent_localer+   rl   ro   r>   ZformatstringÚmainZmonthlenZ	prevmonthZ	nextmonth)Ú	blacklist)r   Zcheck__all__r8   )r3   rø   r,   r,   r-   Útest__all__  s    


zMiscTestCase.test__all__N)rx   ry   rz   rù   r,   r,   r,   r-   rö     s   rö   c               @   sD   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dS )ÚTestSubClassingCasec             C   s   G dd„ dt jƒ}|ƒ | _d S )Nc               @   s@   e Zd Zdd„ ejjD ƒZddddddd	gZd
ZdZdZ	dZ
dS )z0TestSubClassingCase.setUp.<locals>.CustomHTMLCalc             S   s   g | ]}|d  ‘qS )z text-nowrapr,   )rR   Zstyler,   r,   r-   rW   ž  s    z;TestSubClassingCase.setUp.<locals>.CustomHTMLCal.<listcomp>ZredZblueZgreenZlilacZyellowZorangeZpinkztext-center month-headztext-center monthztext-italic zlead N)rx   ry   rz   r8   r9   Z
cssclassesÚcssclasses_weekday_headZcssclass_month_headZcssclass_monthÚcssclass_yearÚcssclass_year_headr,   r,   r,   r-   ÚCustomHTMLCal  s   
rþ   )r8   r9   r@   )r3   rþ   r,   r,   r-   rª   ›  s    
zTestSubClassingCase.setUpc             C   s   |   d| j dd¡¡ d S )Nzclass="text-center month-head"iá  r   )r¤   r@   rh   )r3   r,   r,   r-   Útest_formatmonthname©  s    z(TestSubClassingCase.test_formatmonthnamec             C   s   |   d| j dd¡¡ d S )Nzclass="text-center month"iá  r   )r¤   r@   rc   )r3   r,   r,   r-   rf   ­  s    z$TestSubClassingCase.test_formatmonthc             C   s*   | j  dd¡}|  d| j  |d ¡¡ d S )Niá  r   zclass="wed text-nowrap"r   )r@   Zmonthdays2calendarr¤   Z
formatweek)r3   r­   r,   r,   r-   Útest_formatweek±  s    z#TestSubClassingCase.test_formatweekc             C   s0   | j  ¡ }x | j jD ]}|  d| |¡ qW d S )Nz<th class="%s">)r@   r`   rû   r¤   )r3   ÚheaderZcolorr,   r,   r-   Útest_formatweek_headµ  s    
z(TestSubClassingCase.test_formatweek_headc             C   s    |   d| jj | j d¡¡ d S )Nz=<table border="0" cellpadding="0" cellspacing="0" class="%s">iá  )r¤   r@   rü   rG   )r3   r,   r,   r-   Útest_format_yearº  s    z$TestSubClassingCase.test_format_yearc             C   s&   |   dd| jjdf | j d¡¡ d S )Nz,<tr><th colspan="%d" class="%s">%s</th></tr>r   iá  )r¤   r@   rý   rG   )r3   r,   r,   r-   Útest_format_year_head¿  s    z)TestSubClassingCase.test_format_year_headN)
rx   ry   rz   rª   rÿ   rf   r   r  r  r  r,   r,   r,   r-   rú   ™  s   rú   Ú__main__)$r8   r›   Ztestr   Ztest.support.script_helperr   r   r¸   r™   rK   r   rÎ   re   rD   rd   rC   Údictr:   r=   r^   r\   ZTestCaser(   r{   r¨   r°   r´   rµ   r»   rÅ   rÐ   rÑ   rö   rú   rx   r÷   r,   r,   r,   r-   Ú<module>   s0  '
&}
|k:9w
*
