Skip to content

Commit

Permalink
TST/CLN: refactor tests\io\formats\test_to_html.py (#23747)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjayhawkins authored and jreback committed Nov 17, 2018
1 parent 3abff0d commit e9bbc6f
Show file tree
Hide file tree
Showing 30 changed files with 1,616 additions and 1,564 deletions.
18 changes: 18 additions & 0 deletions pandas/tests/io/formats/data/datetime64_hourformatter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th>hod</th>
</tr>
</thead>
<tbody>
<tr>
<th>0</th>
<td>10:10</td>
</tr>
<tr>
<th>1</th>
<td>12:12</td>
</tr>
</tbody>
</table>
18 changes: 18 additions & 0 deletions pandas/tests/io/formats/data/datetime64_monthformatter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th>months</th>
</tr>
</thead>
<tbody>
<tr>
<th>0</th>
<td>2016-01</td>
</tr>
<tr>
<th>1</th>
<td>2016-02</td>
</tr>
</tbody>
</table>
21 changes: 21 additions & 0 deletions pandas/tests/io/formats/data/escape_disabled.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th>co<l1</th>
<th>co>l2</th>
</tr>
</thead>
<tbody>
<tr>
<th>str<ing1 &amp;</th>
<td><b>bold</b></td>
<td><b>bold</b></td>
</tr>
<tr>
<th>stri>ng2 &amp;</th>
<td><b>bold</b></td>
<td><b>bold</b></td>
</tr>
</tbody>
</table>
21 changes: 21 additions & 0 deletions pandas/tests/io/formats/data/escaped.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th>co&lt;l1</th>
<th>co&gt;l2</th>
</tr>
</thead>
<tbody>
<tr>
<th>str&lt;ing1 &amp;amp;</th>
<td>&lt;type 'str'&gt;</td>
<td>&lt;type 'str'&gt;</td>
</tr>
<tr>
<th>stri&gt;ng2 &amp;amp;</th>
<td>&lt;type 'str'&gt;</td>
<td>&lt;type 'str'&gt;</td>
</tr>
</tbody>
</table>
22 changes: 22 additions & 0 deletions pandas/tests/io/formats/data/gh12031_expected_output.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<th>0</th>
<td>6,0</td>
</tr>
<tr>
<th>1</th>
<td>3,1</td>
</tr>
<tr>
<th>2</th>
<td>2,2</td>
</tr>
</tbody>
</table>
274 changes: 274 additions & 0 deletions pandas/tests/io/formats/data/gh14882_expected_output_1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,274 @@
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th></th>
<th></th>
<th>n</th>
</tr>
<tr>
<th>a</th>
<th>b</th>
<th>c</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<th rowspan="21" valign="top">100</th>
<th rowspan="7" valign="top">10</th>
<th>1</th>
<td>0</td>
</tr>
<tr>
<th>2</th>
<td>1</td>
</tr>
<tr>
<th>3</th>
<td>2</td>
</tr>
<tr>
<th>4</th>
<td>3</td>
</tr>
<tr>
<th>5</th>
<td>4</td>
</tr>
<tr>
<th>6</th>
<td>5</td>
</tr>
<tr>
<th>7</th>
<td>6</td>
</tr>
<tr>
<th rowspan="7" valign="top">20</th>
<th>1</th>
<td>7</td>
</tr>
<tr>
<th>2</th>
<td>8</td>
</tr>
<tr>
<th>3</th>
<td>9</td>
</tr>
<tr>
<th>4</th>
<td>10</td>
</tr>
<tr>
<th>5</th>
<td>11</td>
</tr>
<tr>
<th>6</th>
<td>12</td>
</tr>
<tr>
<th>7</th>
<td>13</td>
</tr>
<tr>
<th rowspan="7" valign="top">30</th>
<th>1</th>
<td>14</td>
</tr>
<tr>
<th>2</th>
<td>15</td>
</tr>
<tr>
<th>3</th>
<td>16</td>
</tr>
<tr>
<th>4</th>
<td>17</td>
</tr>
<tr>
<th>5</th>
<td>18</td>
</tr>
<tr>
<th>6</th>
<td>19</td>
</tr>
<tr>
<th>7</th>
<td>20</td>
</tr>
<tr>
<th rowspan="19" valign="top">200</th>
<th rowspan="7" valign="top">10</th>
<th>1</th>
<td>21</td>
</tr>
<tr>
<th>2</th>
<td>22</td>
</tr>
<tr>
<th>3</th>
<td>23</td>
</tr>
<tr>
<th>4</th>
<td>24</td>
</tr>
<tr>
<th>5</th>
<td>25</td>
</tr>
<tr>
<th>6</th>
<td>26</td>
</tr>
<tr>
<th>7</th>
<td>27</td>
</tr>
<tr>
<th rowspan="5" valign="top">20</th>
<th>1</th>
<td>28</td>
</tr>
<tr>
<th>2</th>
<td>29</td>
</tr>
<tr>
<th>...</th>
<td>...</td>
</tr>
<tr>
<th>6</th>
<td>33</td>
</tr>
<tr>
<th>7</th>
<td>34</td>
</tr>
<tr>
<th rowspan="7" valign="top">30</th>
<th>1</th>
<td>35</td>
</tr>
<tr>
<th>2</th>
<td>36</td>
</tr>
<tr>
<th>3</th>
<td>37</td>
</tr>
<tr>
<th>4</th>
<td>38</td>
</tr>
<tr>
<th>5</th>
<td>39</td>
</tr>
<tr>
<th>6</th>
<td>40</td>
</tr>
<tr>
<th>7</th>
<td>41</td>
</tr>
<tr>
<th rowspan="21" valign="top">300</th>
<th rowspan="7" valign="top">10</th>
<th>1</th>
<td>42</td>
</tr>
<tr>
<th>2</th>
<td>43</td>
</tr>
<tr>
<th>3</th>
<td>44</td>
</tr>
<tr>
<th>4</th>
<td>45</td>
</tr>
<tr>
<th>5</th>
<td>46</td>
</tr>
<tr>
<th>6</th>
<td>47</td>
</tr>
<tr>
<th>7</th>
<td>48</td>
</tr>
<tr>
<th rowspan="7" valign="top">20</th>
<th>1</th>
<td>49</td>
</tr>
<tr>
<th>2</th>
<td>50</td>
</tr>
<tr>
<th>3</th>
<td>51</td>
</tr>
<tr>
<th>4</th>
<td>52</td>
</tr>
<tr>
<th>5</th>
<td>53</td>
</tr>
<tr>
<th>6</th>
<td>54</td>
</tr>
<tr>
<th>7</th>
<td>55</td>
</tr>
<tr>
<th rowspan="7" valign="top">30</th>
<th>1</th>
<td>56</td>
</tr>
<tr>
<th>2</th>
<td>57</td>
</tr>
<tr>
<th>3</th>
<td>58</td>
</tr>
<tr>
<th>4</th>
<td>59</td>
</tr>
<tr>
<th>5</th>
<td>60</td>
</tr>
<tr>
<th>6</th>
<td>61</td>
</tr>
<tr>
<th>7</th>
<td>62</td>
</tr>
</tbody>
</table>
Loading

0 comments on commit e9bbc6f

Please sign in to comment.