zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
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
32
33
34
U
­ý°dk    ã@s|ddlmZddlZddlZe d¡dd„Zdd„Zdd    „Zd
d „Z    d d „Z
dd„Z ej   dddg¡dd„ƒZdd„ZdS)é)ÚStringIONÚtabulatecCs:tƒ}t dddg¡}|j|d| ¡}|dks6t‚dS)Nééé©Úbufú@|    |   0 |
|---:|----:|
|  0 |   1 |
|  1 |   2 |
|  2 |   3 |©rÚpdÚ    DataFrameÚ to_markdownÚgetvalueÚAssertionError©rÚdfÚresult©rú_d:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/tests/io/formats/test_to_markdown.pyÚ test_simple
s  ÿrcCsBtƒ}t gggdœ¡ d¡}|j|d| ¡}|dks>t‚dS)N)ÚidZ
first_nameÚ    last_namerrzK| id   | first_name   | last_name   |
|------|--------------|-------------|)rr r Z    set_indexr rrrrrrÚtest_empty_frames ÿrcCs<tƒ}t dddg¡}|j|dd| ¡}|dks8t‚dS)NrrrZjira)rZtablefmtz6||    ||   0 ||
|  0 |   1 |
|  1 |   2 |
|  2 |   3 |r
rrrrÚtest_other_tablefmts
rcCs@tƒ}t dddg¡}|j|ddgd| ¡}|dks<t‚dS)NrrrÚfooÚbar)rÚheaderszY|   foo |   bar |
|------:|------:|
|     0 |     1 |
|     1 |     2 |
|     2 |     3 |r
rrrrÚtest_other_headers'sÿrcCs>tƒ}tjdddgdd}|j|d| ¡}|dks:t‚dS)Nrrrr)ÚnamerzJ|    |   foo |
|---:|------:|
|  0 |     1 |
|  1 |     2 |
|  2 |     3 |)rr ZSeriesr rr)rÚsrrrrÚ test_series2s ÿr cCs(t dddg¡}| ¡}|dks$t‚dS)Nrrrr    ©r r r r)rrrrrÚ test_no_buf=sÿr"ÚindexTFcCs:t dddg¡}|j|d}|r&d}nd}||ks6t‚dS)Nrrr)r#r    z'|   0 |
|----:|
|   1 |
|   2 |
|   3 |r!)r#rrÚexpectedrrrÚ
test_indexEs ÿr%c    Cs<t dddg¡}tjtdd|jdddW5QRXdS)Nrrrz"Pass 'index' instead of 'showindex)ÚmatchT)r#Z    showindex)r r ÚpytestZraisesÚ
ValueErrorr )rrrrÚ#test_showindex_disallowed_in_kwargsVsr))Úiorr'Zpandasr Z importorskiprrrrr r"ÚmarkZ parametrizer%r)rrrrÚ<module>s