+
    xȇi              	          ^ RI Ht ^ RIHt ^ RIHtHt ^ RIt^ RIH	t	 ^ RI
t
^ RIt^ RIHt ^ RIt^ RIt^ RIHt ^ RIHu Ht ^ RIt^ RIHtHtHtHtHtHtHtH t H!t! ^ RI"H#t$ ^ R	I%H&t& ]PN                  ! . ROR
7      R 4       t(R t)R t*R t+R t,]PN                  ! ]PZ                  ! R]P\                  ! R4      ]P\                  ! R4      .R7      ]PZ                  ! R]P\                  ! R4      R7      .R
7      R 4       t/ ! R R4      t0R# )    Iterator)partial)BytesIOStringION)Path)URLError)is_platform_windows)	NA	DataFrame
MultiIndexSeries	Timestamp
date_rangeread_csv	read_htmlto_datetime)file_path_to_url)paramsc                ,    V! RRRV P                   4      # )z6Parametrized fixture for HTML encoding test filenames.iodatahtml_encoding)param)requestdatapaths   &&i/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/io/test_html.pyhtml_encoding_filer   $   s     D&/7==AA    c                 T   \        V 4      \        V4      8X  g    Q R \        V 4       R\        V4       24       hRp\        \        R V V4      4      pV'       g   Q V4       h\        W4       F8  w  rg\        P
                  ! Wg.VO5/ VB  VP                  '       g   K3  Q R4       h	  R# )z*lists are not of equal size len(list1) == z, len(list2) == z$not all list elements are DataFramesc                 R    \        V \        4      ;'       d    \        V\        4      # N
isinstancer   )xys   &&r   <lambda>(assert_framelist_equal.<locals>.<lambda>:   s    Ay1NNjI6NNr   zframes are both emptyN)lenallmapziptmassert_frame_equalempty)list1list2argskwargsmsgboth_framesframe_iframe_js   &&*,    r   assert_framelist_equalr8   1   s    u:U# 	U %U	&#
 1CN	
K ;-
g@@@===9"99  .r   c           
      2   \         P                  ! R 4      p\         P                  ! R4       V P                  VRR4       \         P                  ! \        RR7      ;_uu_ 4        \        V! RRRR	4      R R
7       RRR4       R#   + '       g   i     R# ; i)bs4html5lib__version__z4.2zPandas requires versionmatchr   r   html	spam.htmlflavorN)pytestimportorskipsetattrraisesImportErrorr   )monkeypatchr   r:   s   && r   test_bs4_version_failsrI   E   si    


e
$C

#]E2	{*C	D	D(4=eL 
E	D	D	Ds   $BB	c                      R p RpRV,           R,           p\         P                  ! \        VR7      ;_uu_ 4        \        \	        V 4      RVR7       RRR4       R#   + '       g   i     R# ; i)z
google.comzinvalid flavorz\{z \} is not a valid set of flavorsr=   googler>   rB   N)rC   rF   
ValueErrorr   r   )urlrB   r4   s      r   test_invalid_flavorrO   N   sK    
CF
&.>
>C	z	-	-(3-x? 
.	-	-	-s   AA,	c                     \         P                  ! R 4       \         P                  ! R4       \         P                  ! R4       V ! RRRR4      p\        V^ R.R7      p\        V^ R .R7      p\        W#4       R# )	r:   lxmlr;   r   r   r?   valid_markup.html)	index_colrB   N)rC   rD   r   r8   )r   filenamedfs_lxmldfs_bs4s   &   r   test_same_orderingrW   W   se    



#ff.ABHQx@HAug>G8-r   r:   r;   )marksrQ   c                 8    \        \        V P                  R 7      # )rA   )r   r   r   )r   s   &r   flavor_read_htmlrZ   b   s     9W]]33r   c            	       d	  a  ] tR t^lt o R t]P                  R 4       t]P                  R 4       tR t	R t
]P                  P                  ]P                  P                  R 4       4       t]P                  P                  ]P                  P                  R 4       4       t]P                  P                   R 4       tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R t#R t$R t%]P                  P                  ]P                  P                  R 4       4       t&]P                  P                   ]P                  P                  ]P                  P                  R 4       4       4       t']P                  P                   R 4       t(]P                  P                   R  4       t)]P                  P                   R! 4       t*]P                  P                   R" 4       t+]P                  P                   R# 4       t,]P                  P                   R$ 4       t-]P                  P                   R% 4       t.]P                  P                   R& 4       t/]P                  P                   R' 4       t0R( t1]P                  R) 4       t2]P                  P                  ]P                  P                  R* 4       4       t3]P                  P                  ]P                  P                  R+ 4       4       t4R, t5R- t6R. t7R/ t8R0 t9R1 t:]P                  P                   R2 4       t;]P                  P                   R3 4       t<R4 t=R5 t>R6 t?R7 t@R8 tAR9 tBR: tCR; tDR< tER= tFR> tGR? tHR@ tI]P                  P                  RARBRC.4      RD 4       tKRE tLRF tMRG tNRH tORI tPRJ tQRK tR]P                  P                   RL 4       tSRM tTRN tU]P                  P                  RORBRP.RQ3RCRR.]V! RP.4      3.4      RS 4       tW]P                  P                  RTRBRC.4      RU 4       tX]P                  P                  RV4      RW 4       tZRX t[RY t\]P                  P                   ]P                  P                  RZ 4       4       t]R[ t^R\ t_]P                  P                  RA. RcO4      R] 4       t`R^ taR_ tbR` tcRa tdRbteV tfRQ# )dTestReadHtmlc                    R p\         P                  ! \        VR7      ;_uu_ 4        V! R4       RRR4       R#   + '       g   i     R# ; i)z$\[Errno 2\] No such file or directorr=   a  <table>
                <thead>
                    <tr>
                        <th>A</th>
                        <th>B</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>1</td>
                        <td>2</td>
                    </tr>
                </tbody>
                <tbody>
                    <tr>
                        <td>3</td>
                        <td>4</td>
                    </tr>
                </tbody>
            </table>N)rC   rF   FileNotFoundError)selfrZ   r4   s   && r   test_literal_html_deprecation*TestReadHtml.test_literal_html_deprecationm   s5    5]],C88 9888s	   	:A	c                    V! R RRR4      # )r   r   r?   r@    r_   r   s   &&r   	spam_dataTestReadHtml.spam_data   s    ffk::r   c                    V! R RRR4      # )r   r   r?   banklist.htmlrc   rd   s   &&r   banklist_dataTestReadHtml.banklist_data   s    ffo>>r   c                   \        \        P                  P                  ^4      P                  R4      \        P
                  ! \        R4      4      R7      P                  RP                  4      P                  \        4      pVP                  4       pV! \        V4      RR/^ R7      ^ ,          p\        P                  ! WB4       R# )	   abccolumnsz{:.3f}class	dataframe)attrsrS   N)      )r   nprandomdefault_rngpdIndexlistr+   formatastypefloatto_htmlr   r-   r.   )r_   rZ   dfoutress   &&   r   test_to_html_compat TestReadHtml.test_to_html_compat   s    		%%a(//7e- S!VE] 	 jjlSM';!71

 	c&r   c                N   \        R \        ^\        ^.RR7      R\        . RORR7      R\        R\        R.RR7      R\        . RORR7      R	. ROR. ROR. ROR. RO/4      pVP                  RR7      p\        P
                  ! RV4      ;_uu_ 4        V! \        V4      VR7      ^ ,          pRRR4       VR8X  d<   \        P                  ! R4      p\        P                  ! VP                  4       4      pM\        P                  ! V4      p\        R \        ^\        ^.RR7      R\        . RORR7      R\        R\        R.RR7      R\        . RORR7      R	\        R
R\        .RR7      R\        . RORR7      R\        . ROVR7      R\        . ROVR7      /4      p	VR8X  dM   ^ RIp^ RIHp
 \        V	P                   Uu/ uF"  pW! VP!                  W,          R
R7      4      bK$  	  up4      p	\"        P$                  ! XV	RR7       R#   + '       g   i     ELi; iu upi )aInt64)dtypebc      ?      @Float64deTFNfghindexzmode.string_storagedtype_backendpyarrowboolean)ArrowExtensionArray)from_pandas)check_column_type)   rl   rt   )r   g       @r   )TFN)TFTr   r   r   )r   r   N)r   r   r   r~   rx   option_contextr   rC   rD   
ArrowDtypestringStringDtyper   pandas.arraysr   ro   arrayr-   r.   )r_   string_storager   rZ   r   r   resultpastring_dtypeexpectedr   cols   &&&&        r   test_dtype_backendTestReadHtml.test_dtype_backend   s   VQAJg6VIW5VS"cN)<VO9=((_%	
 jjuj%4nEE%hsm=QRSTF F I%$$Y/B==5L>>.9LVQAJg6VIW5VS"cN)<VO9=VT5"-Y?V/yAVO<@V,LA	
 I% 9   (/// ,RXXhmQUX-VWW/H 	fh%HI FEE8s   H(H"H	c                   \        VR R7      ;_uu_ 4       pVP                  VP                  4       R7       V! VP                  RR7      pV! VP                  RR7      pRRR4       \	        XX4       R#   + '       g   i     L; i)utf-8encodingcontentFirst Federal Bank of Floridar=   Metcalf BankNopenserve_contentreadrN   r8   )r_   
httpserverri   rZ   r   df1df2s   &&&&   r   test_banklist_urlTestReadHtml.test_banklist_url   sn     -'22a$$QVVX$6"5C #$C 3 	sC( 32   A	A55B	c                   \        VR R7      ;_uu_ 4       pVP                  VP                  4       R7       V! VP                  RR7      pV! VP                  RR7      pRRR4       \	        XX4       R#   + '       g   i     L; i)r   r   r   	.*Water.*r=   UnitNr   )r_   r   re   rZ   r   r   r   s   &&&&   r   test_spam_urlTestReadHtml.test_spam_url   sd     )g..!$$QVVX$6":>>EC":>>@C /
 	sC( /.r   c                P    V! VR RR/R7      pV! VRRR/R7      p\        W44       R# )z.*Florida.*idtabler>   rr   r   Nr8   )r_   ri   rZ   r   r   s   &&&  r   test_banklistTestReadHtml.test_banklist   s8    tWo
 g
 	s(r   c                    V! VR R7      pV! VRR7      p\        W44       V^ ,          P                  R,          R8X  g   Q hV^ ,          P                  ^ ,          R8X  g   Q hR# )r   r=   r   
ProximatesNutrientNr   r   )r8   ilocro   r_   re   rZ   r   r   s   &&&  r   	test_spamTestReadHtml.test_spam   sX    y<y7s(1v{{4 L0001v~~a J...r   c                X    V! V4      pV F  p\        V\        4      '       d   K  Q h	  R # r"   r#   )r_   re   rZ   dfsr   s   &&&  r   test_spam_no_matchTestReadHtml.test_spam_no_match  s)    y)Bb),,,, r   c                `    V! VR R/R7      pV F  p\        V\        4      '       d   K  Q h	  R# )r   r   )rr   Nr#   )r_   ri   rZ   r   r   s   &&&  r   test_banklist_no_match#TestReadHtml.test_banklist_no_match
  s/    }T7ODBb),,,, r   c                    V! VR ^R7      ^ ,          pVP                   ^ ,          R8X  g   Q hVP                  '       d   Q hR# )r   r>   headerr   N)ro   r/   )r_   re   rZ   r   s   &&& r   test_spam_headerTestReadHtml.test_spam_header  s;    i{1EaHzz!},,,888|8r   c                H    V! VR ^R7      pV! VR^R7      p\        W44       R# r   r>   skiprowsr   Nr   r   s   &&&  r   test_skiprows_intTestReadHtml.test_skiprows_int  &    yaHyCs(r   c                l    V! VR \        ^4      R7      pV! VR\        ^4      R7      p\        W44       R# r   )ranger8   r   s   &&&  r   test_skiprows_range TestReadHtml.test_skiprows_range  .    yeAhOyqJs(r   c                P    V! VR ^^.R7      pV! VR^^.R7      p\        W44       R# r   r   r   s   &&&  r   test_skiprows_listTestReadHtml.test_skiprows_list   .    yq!fMy!QHs(r   c                P    V! VR ^^0R7      pV! VR^^0R7      p\        W44       R# r   r   r   s   &&&  r   test_skiprows_setTestReadHtml.test_skiprows_set&  r   r   c                H    V! VR ^R7      pV! VR^R7      p\        W44       R# r   r   r   s   &&&  r   test_skiprows_slice TestReadHtml.test_skiprows_slice,  r   r   c                l    V! VR \        ^4      R7      pV! VR\        ^4      R7      p\        W44       R# r   slicer8   r   s   &&&  r   test_skiprows_slice_short&TestReadHtml.test_skiprows_slice_short2  r   r   c           	     r    V! VR \        ^^4      R7      pV! VR\        ^^R4      R7      p\        W44       R# )r   r   r   Nr   r   s   &&&  r   test_skiprows_slice_long%TestReadHtml.test_skiprows_slice_long8  s4    yeAqkRyq!RQs(r   c                    V! VR \         P                  ! ^4      R7      pV! VR\         P                  ! ^4      R7      p\        W44       R# r   )ru   aranger8   r   s   &&&  r   test_skiprows_ndarray"TestReadHtml.test_skiprows_ndarray>  s7    ybiiPQlSy1Ns(r   c                    \         P                  ! \        R R7      ;_uu_ 4        V! VRRR7       RRR4       R#   + '       g   i     R# ; i)z%is not a valid type for skipping rowsr=   r   asdfr   N)rC   rF   	TypeError)r_   re   rZ   s   &&&r   test_skiprows_invalid"TestReadHtml.test_skiprows_invalidD  s0    ]]9-TVVYkFK WVVVs	   ;A	c                H    V! VR ^ R7      pV! VR^ R7      p\        W44       R# r   r>   rS   r   Nr   r   s   &&&  r   
test_indexTestReadHtml.test_indexH  s&    yqIy!Ds(r   c                L    V! VR ^^ R7      pV! VR^^ R7      p\        W44       R# r   )r>   r   rS   r   Nr   r   s   &&&  r   test_header_and_index_no_types+TestReadHtml.test_header_and_index_no_typesM  +    yAQRSyqANs(r   c                L    V! VR ^^ R7      pV! VR^^ R7      p\        W44       R# r  r   r   s   &&&  r    test_header_and_index_with_types-TestReadHtml.test_header_and_index_with_typesR  r  r   c                H    V! VR ^ R7      pV! VR^ R7      p\        W44       R# r  r   r   s   &&&  r   test_infer_typesTestReadHtml.test_infer_typesW  s&    yqIy!Ds(r   c                l   \        VR R7      ;_uu_ 4       p\        VP                  4       4      pRRR4       \        VR R7      ;_uu_ 4       p\        VP                  4       4      pRRR4       V! XRR7      pV! XRR7      p\        Wg4       R#   + '       g   i     Lh; i  + '       g   i     LD; iUTF-8r   Nr   r=   r   )r   r   r   r8   )r_   re   rZ   r   data1data2r   r   s   &&&     r   test_string_ioTestReadHtml.test_string_io]  s    )g..!QVVX&E / )g..!QVVX&E / uK8uF3s( /. /.s   BB#B 	#B3	c                    \        VR R7      ;_uu_ 4       pVP                  4       pRRR4       V! \        X4      RR7      pV! \        V4      RR7      p\        WV4       R#   + '       g   i     LC; ir  )r   r   r   r8   )r_   re   rZ   r   r   r   r   s   &&&    r   test_stringTestReadHtml.test_stringh  sT    )g..!668D / x~[Ax~V<s( /.s   A""A2	c                
   \        VR R7      ;_uu_ 4       pV! VRR7      pRRR4       \        VR R7      ;_uu_ 4       pV! VRR7      pRRR4       \        XX4       R#   + '       g   i     LF; i  + '       g   i     L1; i)r  r   r   r=   Nr   )r   r8   )r_   re   rZ   r   r   r   s   &&&   r   test_file_likeTestReadHtml.test_file_likeq  sb    )g..!"1K8C / )g..!"1F3C / 	sC( /. /.s   AA2A/	2B	c                    VP                  R RR7       \        P                  ! \        R R7      ;_uu_ 4        V! RRR7       RRR4       R#   + '       g   i     R# ; i)z#urlopen error unknown url type: git  coder=   zgit://github.comr   N)r   rC   rF   r	   r_   r   rZ   s   &&&r   test_bad_url_protocol"TestReadHtml.test_bad_url_protocolz  sE     	  !FS Q]]8+PQQ/{C RQQQs   AA	c                    VP                  R RR7       \        P                  ! \        \        3RR7      ;_uu_ 4        V! VP
                  RR7       RRR4       R#   + '       g   i     R# ; i)zName or service not knownr#  r$  zHTTP Error 404: NOT FOUNDr=   r   N)r   rC   rF   r	   rM   rN   r&  s   &&&r   test_invalid_urlTestReadHtml.test_invalid_url  sM     	  !<3 G]]Hj19TUUZ^^;? VUUUs   AA.	c                    TpV! \        \        P                  P                  V4      4      R RR/R7      p\	        V\
        4      '       g   Q hV F  p\	        V\        4      '       d   K  Q h	  R# )Firstr   r   r   N)r   ospathabspathr$   rz   r   r_   ri   rZ   rN   r   r   s   &&&   r   test_file_urlTestReadHtml.test_file_url  sa    RWW__S12'$PW
 #t$$$$Bb),,,, r   c                    Tp\         P                  ! \        R R7      ;_uu_ 4        V! VRRR/R7       RRR4       R#   + '       g   i     R# ; i)zNo tables foundr=   r   r   	tasdfabler   NrC   rF   rM   )r_   ri   rZ   rN   s   &&& r   test_invalid_table_attrs%TestReadHtml.test_invalid_table_attrs  s>    ]]:->??:4BU @???	   ?A	c                x    V! VR RR/^ ^.R7      ^ ,          p\        VP                  \        4      '       g   Q hR# )Metcalfr   r   )r>   rr   r   Nr$   ro   r   r_   ri   rZ   r   s   &&& r   test_multiindex_header#TestReadHtml.test_multiindex_header  s>    4/1a&

 "**j1111r   c                x    V! VR RR/^ ^.R7      ^ ,          p\        VP                  \        4      '       g   Q hR# )r;  r   r   )r>   rr   rS   N)r$   r   r   r=  s   &&& r   test_multiindex_index"TestReadHtml.test_multiindex_index  s?    4/aQRV

 "((J////r   c                    V! VR RR/^ ^.^ ^.R7      ^ ,          p\        VP                  \        4      '       g   Q h\        VP                  \        4      '       g   Q hR# )r;  r   r   )r>   rr   r   rS   N)r$   ro   r   r   r=  s   &&& r   test_multiindex_header_index)TestReadHtml.test_multiindex_header_index  sa    /q6!f
  "**j1111"((J////r   c                z    V! VR RR/^ ^.^R7      ^ ,          p\        VP                  \        4      '       g   Q hR# r;  r   r   )r>   rr   r   r   Nr<  r=  s   &&& r   &test_multiindex_header_skiprows_tuples3TestReadHtml.test_multiindex_header_skiprows_tuples  F    /q6
  "**j1111r   c                z    V! VR RR/^ ^.^R7      ^ ,          p\        VP                  \        4      '       g   Q hR# rG  r<  r=  s   &&& r   test_multiindex_header_skiprows,TestReadHtml.test_multiindex_header_skiprows  rJ  r   c           	         V! VR RR/^ ^.^ ^.^R7      ^ ,          p\        VP                  \        4      '       g   Q h\        VP                  \        4      '       g   Q hR# )r;  r   r   )r>   rr   r   rS   r   N)r$   r   r   ro   r=  s   &&& r   %test_multiindex_header_index_skiprows2TestReadHtml.test_multiindex_header_index_skiprows  sd    /q6!f
  "((J////"**j1111r   c                2   TpV! \        \        P                  P                  V4      4      \        P
                  ! \        P
                  ! R 4      4      RR/R7      p\        V\        4      '       g   Q hV F  p\        V\        4      '       d   K  Q h	  R# )Floridar   r   r   N)	r   r.  r/  r0  recompiler$   rz   r   r1  s   &&&   r   test_regex_idempotency#TestReadHtml.test_regex_idempotency  st    RWW__S12**RZZ	23/

 #t$$$$Bb),,,, r   c                    R p\         P                  ! \        VR7      ;_uu_ 4        V! VRRR7       RRR4       R#   + '       g   i     R# ; i)z\(you passed a negative value\)r=   Waterr   Nr   r6  )r_   re   rZ   r4   s   &&& r   test_negative_skiprows#TestReadHtml.test_negative_skiprows  s3    0]]:S11YgC 2111s	   =A	c                    R # )af  
          <table class="contentstable" align="center"><tr>
            <td width="50%">
            <p class="biglink"><a class="biglink" href="whatsnew/2.7.html">What's new in Python 2.7?</a><br/>
                <span class="linkdescr">or <a href="whatsnew/index.html">all "What's new" documents</a> since 2.0</span></p>
            <p class="biglink"><a class="biglink" href="tutorial/index.html">Tutorial</a><br/>
                <span class="linkdescr">start here</span></p>
            <p class="biglink"><a class="biglink" href="library/index.html">Library Reference</a><br/>
                <span class="linkdescr">keep this under your pillow</span></p>
            <p class="biglink"><a class="biglink" href="reference/index.html">Language Reference</a><br/>
                <span class="linkdescr">describes syntax and language elements</span></p>
            <p class="biglink"><a class="biglink" href="using/index.html">Python Setup and Usage</a><br/>
                <span class="linkdescr">how to use Python on different platforms</span></p>
            <p class="biglink"><a class="biglink" href="howto/index.html">Python HOWTOs</a><br/>
                <span class="linkdescr">in-depth documents on specific topics</span></p>
            </td><td width="50%">
            <p class="biglink"><a class="biglink" href="installing/index.html">Installing Python Modules</a><br/>
                <span class="linkdescr">installing from the Python Package Index &amp; other sources</span></p>
            <p class="biglink"><a class="biglink" href="distributing/index.html">Distributing Python Modules</a><br/>
                <span class="linkdescr">publishing modules for installation by others</span></p>
            <p class="biglink"><a class="biglink" href="extending/index.html">Extending and Embedding</a><br/>
                <span class="linkdescr">tutorial for C/C++ programmers</span></p>
            <p class="biglink"><a class="biglink" href="c-api/index.html">Python/C API</a><br/>
                <span class="linkdescr">reference for C/C++ programmers</span></p>
            <p class="biglink"><a class="biglink" href="faq/index.html">FAQs</a><br/>
                <span class="linkdescr">frequently asked questions (with answers!)</span></p>
            </td></tr>
        </table>

        <p><strong>Indices and tables:</strong></p>
        <table class="contentstable" align="center"><tr>
            <td width="50%">
            <p class="biglink"><a class="biglink" href="py-modindex.html">Python Global Module Index</a><br/>
                <span class="linkdescr">quick access to all modules</span></p>
            <p class="biglink"><a class="biglink" href="genindex.html">General Index</a><br/>
                <span class="linkdescr">all functions, classes, terms</span></p>
            <p class="biglink"><a class="biglink" href="glossary.html">Glossary</a><br/>
                <span class="linkdescr">the most important terms explained</span></p>
            </td><td width="50%">
            <p class="biglink"><a class="biglink" href="search.html">Search page</a><br/>
                <span class="linkdescr">search this documentation</span></p>
            <p class="biglink"><a class="biglink" href="contents.html">Complete Table of Contents</a><br/>
                <span class="linkdescr">lists all sections and subsections</span></p>
            </td></tr>
        </table>
        rc   r_   s   &r   python_docsTestReadHtml.python_docs  s    -r   c                v    VP                  VR 7       V! VP                  RR7      p\        V4      ^8  g   Q hR# )r   Pythonr=   N)r   rN   r)   )r_   r]  r   rZ   r   s   &&&& r   test_multiple_matches"TestReadHtml.test_multiple_matches  s5     	   5z~~X>3x!||r   c                    VP                  VR 7       V! VP                  RR7      pV Uu. uF  qUP                  R,          R,          NK  	  pp\        V4      RR.8X  g   Q hR# u upi )r   r`  r=   :r   rs   NPythWhatNr   )r   rN   r   sorted)r_   r]  r   rZ   r   r   zzs   &&&&   r   test_python_docs_table#TestReadHtml.test_python_docs_table!  sc     	   5z~~X>+./3RggdmC  3/bzff---- 0s   "A%c                P    RpV! \        V4      4      p\        V4      ^8X  g   Q hR# )z0
Make sure that read_html ignores empty tables.
a  
            <table>
                <thead>
                    <tr>
                        <th>A</th>
                        <th>B</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>1</td>
                        <td>2</td>
                    </tr>
                </tbody>
            </table>
            <table>
                <tbody>
                </tbody>
            </table>
        N)r   r)   )r_   rZ   r?   r   s   &&  r   test_empty_tablesTestReadHtml.test_empty_tables)  s+    ( "(4.16{ar   c                    V! \        R 4      4      ^ ,          p\        ^^.^^..RR.R7      p\        P                  ! W#4       R# )a  <table>
            <thead>
                <tr>
                    <th>A</th>
                    <th>B</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>1</td>
                    <td>2</td>
                </tr>
            </tbody>
            <tbody>
                <tr>
                    <td>3</td>
                    <td>4</td>
                </tr>
            </tbody>
        </table>ABr   ro   Nr   r   r-   r.   r_   rZ   r   r   s   &&  r   test_multiple_tbody TestReadHtml.test_multiple_tbodyD  sR     "
. /2 Aq6Aq6"2S#JG
f/r   c                    V! \        R4      4      ^ ,          p\        RR/^ .R7      p\        P                  ! W#4       R# )z\
Don't fail with bs4 when there is a header and only one column
as described in issue #9178
a3  <table>
                <thead>
                    <tr>
                        <th>Header</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>first</td>
                    </tr>
                </tbody>
            </table>Headerfirstr   r   Nrq  rr  s   &&  r   test_header_and_one_column'TestReadHtml.test_header_and_one_columnd  sH    
 "
 " 8W"5aSA
f/r   c                    V! \        R4      4      ^ ,          p\        . RO.. ROR7      p\        P                  ! W#4       R# )z;
Ensure parser adds <tr> within <thead> on malformed HTML.
a  <table>
            <thead>
                <tr>
                    <th>Country</th>
                    <th>Municipality</th>
                    <th>Year</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Ukraine</td>
                    <th>Odessa</th>
                    <td>1944</td>
                </tr>
            </tbody>
        </table>rp  N)UkraineOdessa  )CountryMunicipalityYearrq  rr  s   &&  r   test_thead_without_tr"TestReadHtml.test_thead_without_tr~  sJ     "
& '* -.7

 	f/r   c                X   Rp\        RR..RR.R7      p\        RR.RR..RR.R7      pVP                  R	R
7      pVP                  RR
7      pV! \        V4      4      ^ ,          pV! \        V4      4      ^ ,          p\        P                  ! Ws4       \        P                  ! W4       R# )zP
Make sure that read_html reads tfoot, containing td or th.
Ignores empty tfoot
a  <table>
            <thead>
                <tr>
                    <th>A</th>
                    <th>B</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>bodyA</td>
                    <td>bodyB</td>
                </tr>
            </tbody>
            <tfoot>
                {footer}
            </tfoot>
        </table>bodyAbodyBrn  ro  rp  footAfootB )footerz%<tr><td>footA</td><th>footB</th></tr>N)r   r{   r   r-   r.   )	r_   rZ   data_template	expected1	expected2r  r  result1result2s	   &&       r   test_tfoot_readTestReadHtml.test_tfoot_read  s    
$ Wg$6#7#sL	G$w&89C:
	 $$B$/$$,S$T"8E?3A6"8E?3A6
g1
g1r   c                    V! \        R 4      ^ R7      ^ ,          p\        RR..RR7      p\        P                  ! W#4       R# )a
  
            <table>
                <tr>
                    <td>S</td>
                    <td>I</td>
                </tr>
                <tr>
                    <td>text</td>
                    <td>1944</td>
                </tr>
            </table>
        r   textr~  rn   N)SIrq  rr  s   &&  r   &test_parse_header_of_non_string_column3TestReadHtml.test_parse_header_of_non_string_column  sM     " 
  !$ vtn-zB
f/r   c                8  a ^ RI Ho V3R lpV! VRRR/R7      ^ ,          p\        V! RRR	R
4      R\        R\        /R7      pVP                  \        V4      VP                  ^,          38X  g   Q h. ROp. ROpVP                  V4      P                  Wx4      p	VP                  V4      p
T	pRR.pW,          P                  \        4      W&   WR,          P                  VR,          4      ,          P                  RR7      p
\        P                  ! W4       R# )r   )_remove_whitespacec                 <   <  S! V 4      #   \          d    T u # i ; ir"   )AttributeError)r%   r  s   &r   try_remove_ws8TestReadHtml.test_banklist_header.<locals>.try_remove_ws  s'    )!,,! s    r;  r   r   r   r   r   csvzbanklist.csvzUpdated DatezClosing Date
convertersz	Bank NameT)dropN)
z,First Vietnamese American Bank In Vietnamesez"Westernbank Puerto Rico En Espanolz*R-G Premier Bank of Puerto Rico En EspanolzEurobank En EspanolzSanderson State Bank En EspanolzLWashington Mutual Bank (Including its subsidiary Washington Mutual Bank FSB)zSilver State Bank En Espanolz%AmTrade International Bank En EspanolzHamilton Bank, NA En Espanolz6The Citizens Savings Bank Pioneer Community Bank, Inc.)
zFirst Vietnamese American BankzWesternbank Puerto RicozR-G Premier Bank of Puerto RicoEurobankzSanderson State BankzWashington Mutual BankzSilver State BankzAmTrade International BankzHamilton Bank, NAzThe Citizens Savings Bank)pandas.io.htmlr  r   r   shaper)   r+   replaceapplyr   isinreset_indexr-   r.   )r_   ri   r   rZ   r  r   ground_trutholdnewdfnewgtnew	converted	date_colsr  s   &&&&         @r   test_banklist_header!TestReadHtml.test_banklist_header  s   5	 m9T7OTUVWT65.9&	>9M

 xxCG\%7%7%:;;;;

 }%--c7  /	#^4	(399+F	K(--i.DEFRR S 
 	i/r   c                    R p\        VRR7      ;_uu_ 4       pVP                  4       pRRR4       VX9   g   Q hV! WRR/R7      ^ ,          pW6P                  4       9   g   Q hR#   + '       g   i     LD; i)zHeartland Bankr   r   Nr   r   r   )r   r   	to_string)r_   ri   rZ   gcr   raw_textr   s   &&&    r   test_heartland_bank TestReadHtml.test_heartland_bank  sd    -'22avvxH 3 X~~mdG_MaP\\^### 32s   A%%A5	c                    V! \        R 4      ^ R7      ^ ,          pV! \        R4      ^ R7      ^ ,          p\        P                  ! W24       R# )a  <table>
                        <thead>
                            <tr style="text-align: right;">
                            <th></th>
                            <th>C_l0_g0</th>
                            <th>C_l0_g1</th>
                            <th>C_l0_g2</th>
                            <th>C_l0_g3</th>
                            <th>C_l0_g4</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                            <th>R_l0_g0</th>
                            <td> 0.763</td>
                            <td> 0.233</td>
                            <td> nan</td>
                            <td> nan</td>
                            <td> nan</td>
                            </tr>
                            <tr>
                            <th>R_l0_g1</th>
                            <td> 0.244</td>
                            <td> 0.285</td>
                            <td> 0.392</td>
                            <td> 0.137</td>
                            <td> 0.222</td>
                            </tr>
                        </tbody>
                    </table>rS   a  <table>
                    <thead>
                        <tr style="text-align: right;">
                        <th></th>
                        <th>C_l0_g0</th>
                        <th>C_l0_g1</th>
                        <th>C_l0_g2</th>
                        <th>C_l0_g3</th>
                        <th>C_l0_g4</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                        <th>R_l0_g0</th>
                        <td> 0.763</td>
                        <td> 0.233</td>
                        </tr>
                        <tr>
                        <th>R_l0_g1</th>
                        <td> 0.244</td>
                        <td> 0.285</td>
                        <td> 0.392</td>
                        <td> 0.137</td>
                        <td> 0.222</td>
                        </tr>
                    </tbody>
                 </table>N)r   r-   r.   )r_   rZ   r   r   s   &&  r   test_different_number_of_cols*TestReadHtml.test_different_number_of_cols  sf    # @ C"
D E"H ": =
> ?B 	f/r   c                    V! \        R 4      4      ^ ,          p\        . RO.. ROR7      p\        P                  ! W#4       R# )aZ  
            <table>
                <tr>
                    <th>A</th>
                    <th colspan="1">B</th>
                    <th rowspan="1">C</th>
                </tr>
                <tr>
                    <td>a</td>
                    <td>b</td>
                    <td>c</td>
                </tr>
            </table>
        rn   Nr   )rn  ro  Crq  rr  s   &&  r   test_colspan_rowspan_1#TestReadHtml.test_colspan_rowspan_1c  sB    !
" #& o.H
f/r   c                    V! \        R 4      ^ R7      ^ ,          p\        . RO.. ROR7      p\        P                  ! W#4       R# )a  
            <table>
                <tr>
                    <td colspan="2">X</td>
                    <td>Y</td>
                    <td rowspan="2">Z</td>
                    <td>W</td>
                </tr>
                <tr>
                    <td>A</td>
                    <td colspan="2">B</td>
                    <td>C</td>
                </tr>
            </table>
        r  rp  N)rn  ro  ro  Zr  )XzX.1Yr  Wrq  rr  s   &&  r    test_colspan_rowspan_copy_values-TestReadHtml.test_colspan_rowspan_copy_values|  sO     "" %
& '* +,6Q
 	f/r   c                    V! \        R 4      ^ R7      ^ ,          p\        . RO.. ROR7      p\        P                  ! W#4       R# )a(  
            <table>
                <tr>
                    <td rowspan="2">A</td>
                    <td rowspan="2" colspan="3">B</td>
                    <td>C</td>
                </tr>
                <tr>
                    <td>D</td>
                </tr>
            </table>
        r  rp  N)rn  ro  ro  ro  D)rn  ro  zB.1zB.2r  rq  rr  s   &&  r   test_colspan_rowspan_both_not_1,TestReadHtml.test_colspan_rowspan_both_not_1  sO     " 
  !$ +,6S
 	f/r   c                    V! \        R 4      ^ R7      ^ ,          p\        RR..RR.R7      p\        P                  ! W#4       R# )z
            <table>
                <tr>
                    <td>A</td>
                    <td rowspan="2">B</td>
                </tr>
                <tr>
                    <td>C</td>
                </tr>
            </table>
        r  r  ro  rn  rp  Nrq  rr  s   &&  r   test_rowspan_at_end_of_row'TestReadHtml.test_rowspan_at_end_of_row  sP     "
 
 " C:,c
C
f/r   c                    V! \        R 4      ^ R7      ^ ,          p\        RR.RR..RR.R7      p\        P                  ! W#4       R# )z
            <table>
                <tr>
                    <td rowspan="3">A</td>
                    <td rowspan="3">B</td>
                </tr>
            </table>
        r  rn  ro  rp  Nrq  rr  s   &&  r   test_rowspan_only_rows#TestReadHtml.test_rowspan_only_rows  sW     "	 
  C:Sz":S#JO
f/r   c                    V! \        R 4      4      ^ ,          p\        R^.R^..RR.R7      p\        P                  ! W#4       R# )aZ  
            <table>
                <tr>
                    <th rowspan="2">A</th>
                    <th>B</th>
                </tr>
                <tr>
                    <td>1</td>
                </tr>
                <tr>
                    <td>C</td>
                    <td>2</td>
                </tr>
            </table>
        rn  r  ro  rp  Nrq  rr  s   &&  r   *test_rowspan_in_header_overflowing_to_body7TestReadHtml.test_rowspan_in_header_overflowing_to_body  sR     "
$ %( C8c1X"6c
K
f/r   c                    V! \        R 4      4      ^ ,          p\        RR.RR..^ ^.^ ^..R7      p\        ^^..VR7      p\        P                  ! W$4       R# )am  
            <table>
                <tr>
                    <th>A</th>
                    <th>B</th>
                </tr>
                <tr>
                    <th>a</th>
                    <th>b</th>
                </tr>
                <tr>
                    <td>1</td>
                    <td>2</td>
                </tr>
            </table>
        rn  ro  r   r   levelscodesrp  Nr   r   r   r-   r.   r_   rZ   r   ro   r   s   &&   r   +test_header_inferred_from_rows_with_only_th8TestReadHtml.test_header_inferred_from_rows_with_only_th  sl    !
& '* c3Z#s$<aVaQRVDTUAq6(G<
f/r   c                z   \        R \        R^
R7      /4      pVR,          pVR ,          P                  P                  R4      VR &   VP	                  4       pV! \        V4      ^.^ R7      p\        P                  ! W5^ ,          4       V! \        V4      R .^ R7      p\        P                  ! W5^ ,          4       R# )datez1/1/2001periods:NNNus)parse_datesrS   N)r   r   dtas_unitr~   r   r-   r.   )r_   rZ   r   r   str_dfr   s   &&    r   test_parse_dates_list"TestReadHtml.test_parse_dates_list(  s    
:r BCDa5#F+..66t<x/aSAN
hA/x/fXQRS
hA/r   c                   V! R RRR4      p\         P                  P                  V4      '       g   Q V: R24       h\         P                  P                  V4      '       g   Q V: R24       hV! VR^R7      ^ ,          pVP                  R8X  g   Q hRVP
                  R,          9   g   Q hVR	,          P                  \        P                  ! R
4      8X  g   Q h\        P                  ! VP                  R,          R4      '       g   Q hR# )r   r   r?   wikipedia_states.htmlz is not a filez is an empty fileArizonar   Unnamedsq mifloat64HzPN$AN)<      r   )r   r  )
r.  r/  isfilegetsizer  ro   r   ru   allcloselocr_   r   rZ   r   r   s   &&&  r   test_wikipedia_states_table(TestReadHtml.test_wikipedia_states_table4  s    ff.EFww~~d##>x~%>>#wwt$$B0A&BB$!$iB1E||x'''FNN2....g$$(;;;;{{6::j19====r   c                B   V! R RRR4      pV! VR^ R7      ^ ,          pVP                   R	8X  g   Q hRVP                  R
,          ^,          9   g   Q hVP                  P                  ^8X  g   Q h\        P                  ! VP
                  R,          R4      '       g   Q hR# )r   r   r?   r  r  r  r  r  N)r     r   )Alaska)zTotal area[2]r  )r  ro   nlevelsru   r  r  r  s   &&&  r    test_wikipedia_states_multiindex-TestReadHtml.test_wikipedia_states_multiindex>  s    ff.EF!$i1EaH||x'''FNN2.q1111~~%%***{{6::&JKYWWWWr   c                    V! \        R 4      ^ ^.R7      p\        RR..\        P                  ! RR.4      R7      p\        P
                  ! V^ ,          V4       R# )aK  
                <table>
                    <thead>
                        <tr><th></th><th></tr>
                        <tr><th>A</th><th>B</th></tr>
                    </thead>
                    <tbody>
                        <tr><td>a</td><td>b</td></tr>
                    </tbody>
                </table>
            r  r   r   rn   N)Unnamed: 0_level_0rn  )zUnnamed: 1_level_0ro  )r   r   r   from_tuplesr-   r.   rr  s   &&  r   %test_parser_error_on_empty_header_row2TestReadHtml.test_parser_error_on_empty_header_rowF  sd    !
 q6
  3ZL**,.IJ
 	fQi2r   c                    V! \        R 4      RR7      ^ ,          p\        RR/^ .R7      pVR,          P                  \        P                  ! R4      8X  g   Q h\        P
                  ! W#4       R# )a  <html>
            <body>
             <table>
                <thead>
                    <tr>
                        <th>Header</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>1100#101</td>
                    </tr>
                </tbody>
            </table>
            </body>
        </html>#)decimalrv  gClg0@rx  r  N)r   r   r   ru   r-   r.   rr  s   &&  r   test_decimal_rowsTestReadHtml.test_decimal_rows_  sm    !$ '
( ), 8X"6qcBh%%))<<<<
f/r   argTFc                    \         P                  ! R 4      p\        P                  ! \        VR7      ;_uu_ 4        V! WR7       RRR4       R#   + '       g   i     R# ; i)zPassing a bool to header is invalid. Use header=None for no header or header=int or list-like of ints to specify the row(s) making up the column namesr=   r  N)rS  escaperC   rF   r  )r_   re   r  rZ   r4   s   &&&& r   test_bool_header_arg!TestReadHtml.test_bool_header_arg|  sA     ii

 ]]9C00Y3 1000s   
AA 	c                    V! \        R 4      R\        /R7      ^ ,          p\        RRR./4      p\        P                  ! W#4       R# )a  <table>
                 <thead>
                   <tr>
                     <th>a</th>
                    </tr>
                 </thead>
                 <tbody>
                   <tr>
                     <td> 0.763</td>
                   </tr>
                   <tr>
                     <td> 0.244</td>
                   </tr>
                 </tbody>
               </table>r   r  z0.763z0.244N)r   strr   r-   r.   rr  s   &&  r   test_convertersTestReadHtml.test_converters  sP    !" Sz%
& '* cGW#567
f/r   c                    V! \        R 4      R.R7      ^ ,          p\        RR\        P                  ./4      p\        P
                  ! W#4       R# )a  <table>
                 <thead>
                   <tr>
                     <th>a</th>
                   </tr>
                 </thead>
                 <tbody>
                   <tr>
                     <td> 0.763</td>
                   </tr>
                   <tr>
                     <td> 0.244</td>
                   </tr>
                 </tbody>
               </table>gZd;?)	na_valuesr   g"~j?Nr   r   ru   nanr-   r.   rr  s   &&  r   test_na_valuesTestReadHtml.test_na_values  sQ    !" g%
& '* cE266?34
f/r   c                >   R p\        RRR./4      pV! \        V4      RR7      ^ ,          p\        P                  ! W44       \        R\        P
                  \        P
                  ./4      pV! \        V4      RR7      ^ ,          p\        P                  ! W44       R# )a  <table>
                        <thead>
                            <tr>
                            <th>a</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                            <td> N/A</td>
                            </tr>
                            <tr>
                            <td> NA</td>
                            </tr>
                        </tbody>
                    </table>r   zN/Ar   F)keep_default_naTN)r   r   r-   r.   ru   r  )r_   rZ   	html_dataexpected_dfhtml_dfs   &&   r   test_keep_default_na!TestReadHtml.test_keep_default_na  s     	   udm 45"8I#6NqQ
k3rvvrvv&6 78"8I#6MaP
k3r   c                    V! \        R 4      4      ^ ,          p\        RR.\        P                  \        P                  ..RR.R7      p\        P
                  ! W#4       R# )ak  
            <table>
                <tr>
                    <th>A</th>
                    <th>B</th>
                </tr>
                <tr>
                    <td>a</td>
                    <td>b</td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
            </table>
        r   r   rn  ro  rp  Nr  rr  s   &&  r   test_preserve_empty_rows%TestReadHtml.test_preserve_empty_rows  sZ    !
& '* C:/?"@3PS*U
f/r   c                    V! \        R 4      4      ^ ,          p\        RR.RR..^ ^.^ ^..R7      p\        ^^..VR7      p\        P                  ! W$4       R# )aU  
            <table>
                <thead>
                    <tr><th></th><th></tr>
                    <tr><th>A</th><th>B</th></tr>
                    <tr><th>a</th><th>b</th></tr>
                </thead>
                <tbody>
                    <tr><td>1</td><td>2</td></tr>
                </tbody>
            </table>
        rn  ro  r   r   r  rp  Nr  r  s   &&   r   ,test_ignore_empty_rows_when_inferring_header9TestReadHtml.test_ignore_empty_rows_when_inferring_header  sl    !
 " c3Z#s$<aVaQRVDTUAq6(G<
f/r   c                    \        . ROR7      p. RO. RO.Vn        VP                  RR7      pV! \        V4      4      ^ ,          p\        P
                  ! W$4       R# )Hillary)r   Fr   N))r%  D   r  )BernieJ   r  )DonaldE   R)r  AgeParty)NamezUnnamed: 1_level_1zUnnamed: 2_level_1)r   ro   r~   r   r-   r.   )r_   rZ   r  r?   r  s   &&   r   test_multiple_header_rows&TestReadHtml.test_multiple_header_rows  sW    Q
 3@
 """/"8D>215
k3r   c                    V! R RRR4      pV! V^ R7      p\        V\        4      '       g   Q h\        V^ ,          \        4      '       g   Q hR# )r   r   r?   rR   r  N)r$   rz   r   )r_   r   rZ   rT   r   s   &&&  r   test_works_on_valid_markup'TestReadHtml.test_works_on_valid_markup  sI    D&&2EFx15#t$$$$#a&),,,,r   c                6    V! R RRR4      pV! VRRR.R7       R# )	r   r   r?   rh   r   rQ   r;   rL   Nrc   )r_   r   rZ   ri   s   &&& r   test_fallback_success"TestReadHtml.test_fallback_success  s#     vvGk6:BVWr   c                    \        R ^
R7      p\        \        P                  P	                  ^4      P                  R4      VR7      pVP                  4       pR V9   g   Q hR# )z
2000-01-01r  r   N)
   rs   )r   r   ru   rv   rw   standard_normalr~   )r_   rngr   r   s   &   r   test_to_html_timestamp#TestReadHtml.test_to_html_timestamp   sN    r2ryy,,Q/??HPSTv%%%r   c                   \        R ^R^/.4      pVP                  4       pVP                  RR7      pVP                  ^R7      pVP                  ^R7      pVP                  ^ R7      pVP                  RR7      pRV9   g   Q hW28X  g   Q hW$8X  g   Q hW%8w  g   Q hRV9   g   Q hRV9  g   Q hRV9  g   Q hWg8X  g   Q hR	# )
rn  ro  T)borderFz border="1"z border="2"z border="0"z borderN)r   r~   )r_   r   out_border_defaultout_border_trueout_border_explicit_defaultout_border_nondefaultout_border_zeroout_border_falses   &       r   test_to_html_borderless$TestReadHtml.test_to_html_borderless'  s    aa()*ZZ\**D*1&(jjj&:# "

!
 4**A*.::U:3 2222444!@@@!::: 5555O333 0000222r   zdisplayed_only,exp0,exp1fooNzfoo  bar  baz  quxc                    R p\        V4      pV! \        V4      VR7      p\        P                  ! V^ ,          V4       Ve!   \        P                  ! V^,          V4       R# \	        V4      ^8X  g   Q hR# )a  <html>
          <body>
            <table>
              <tr>
                <td>
                  foo
                  <span style="display:none;text-align:center">bar</span>
                  <span style="display:none">baz</span>
                  <span style="display: none">qux</span>
                </td>
              </tr>
            </table>
            <table style="display: none">
              <tr>
                <td>foo</td>
              </tr>
            </table>
          </body>
        </html>displayed_onlyN)r   r   r-   r.   r)   )r_   rJ  exp0exp1rZ   r   r   s   &&&&&  r   test_displayed_only TestReadHtml.test_displayed_only:  sb    ( x~nM
c!fd+!!#a&$/s8q= =r   rJ  c                    R pV! \        V4      VR7      ^ ,          p\        R^^.R^^./4      p\        P                  ! WE4       R# )aW  
        <table>
            <tr>
                <th>A</th>
                <th>B</th>
            </tr>
            <tr>
                <td>1</td>
                <td>2</td>
            </tr>
            <tr>
                <td><span style="display:none"></span>4</td>
                <td>5</td>
            </tr>
        </table>
        rI  rn  ro  Nrq  )r_   rJ  rZ   
html_tabler   r   s   &&&   r   &test_displayed_only_with_many_elements3TestReadHtml.test_displayed_only_with_many_elements`  sO    
  "(:"6~V
 cAq63A78
f/r   z\ignore:You provided Unicode markup but also provided a value for from_encoding.*:UserWarningc                H   \         P                  P                  V4      p\         P                  P                  V4      ^ ,          pVP	                  R4      w  rV \        VR4      ;_uu_ 4       pV! \        VP                  4       4      V^ R7      P                  4       pRRR4       \        VR4      ;_uu_ 4       pV! \        VP                  4       4      V^ R7      P                  4       p	RRR4       V! W^ R7      P                  4       p
\        P                  ! XX	4       \        P                  ! W4       R#   + '       g   i     L; i  + '       g   i     Lj; i  \         d6    \        4       '       d$   RT9   g   RT9   d   \        P                  ! 4        h i ; i)r   _rb)r   rS   N1632)r.  r/  basenamesplitextsplitr   r   r   popr-   r.   	Exceptionr
   rC   skip)r_   r   rZ   	base_pathrootrT  r   fobjfrom_stringfrom_file_likefrom_filenames   &&&        r   test_encodeTestReadHtml.test_encodex  s?   
 GG$$%78	ww	*1-jjo	($//4.DIIK(8q#%  0
 ($//4!1DIIK(8q"#%  0
 -"ce  !!+~>!!+= 0/
 0/  	"$$8#tx'7KKM	s>   E! .1D;E! ;1E,AE! ;E	E! E	E! !A F!c                R   VP                   P                  R 4      R8X  d   \        P                  ! R4        ! R R\        4      pV! R4      pV! V4      '       g   Q h\        P
                  ! \        RR7      ;_uu_ 4        V! V4       RRR4       R#   + '       g   i     R# ; i)	rB   rQ   zNot applicable for lxmlc                   &   a  ] tR tRt o R tRtV tR# )FTestReadHtml.test_parse_failure_unseekable.<locals>.UnseekableStringIOi  c                    R # )Frc   r\  s   &r   seekableOTestReadHtml.test_parse_failure_unseekable.<locals>.UnseekableStringIO.seekable  s    r   rc   N)__name__
__module____qualname____firstlineno__rj  __static_attributes____classdictcell____classdict__s   @r   UnseekableStringIOrh    s      r   rt  z?
            <table><tr><td>spam<foobr />eggs</td></tr></table>z#passed a non-rewindable file objectr=   N)keywordsgetrC   r]  r   rF   rM   )r_   rZ   rt  bads   &&  r   test_parse_failure_unseekable*TestReadHtml.test_parse_failure_unseekable  s     $$((2f<KK12	 	 !B

  $$$$]]:-RSSS! TSSSs   	BB&	c                z     ! R  R4      pV! R4      pV! R4      pV! V4      '       g   Q hV! V4      '       g   Q hR# )c                   `   a  ] tR tRt o V 3R lR ltRR ltR tR tR tV 3R	 lR
 lt	Rt
V tR# )9TestReadHtml.test_parse_failure_rewinds.<locals>.MockFilei  c                   < V ^8  d   QhRR/# )rl   returnNrc   )r{   rs  s   "r   __annotate__FTestReadHtml.test_parse_failure_rewinds.<locals>.MockFile.__annotate__  s     $ $ $r   c                     Wn         R V n        R# FN)r   at_end)r_   r   s   &&r   __init__BTestReadHtml.test_parse_failure_rewinds.<locals>.MockFile.__init__  s     	#r   Nc                T    V P                   '       d   R MV P                  pRV n         V# )r  Tr  r   )r_   sizer   s   && r   r   >TestReadHtml.test_parse_failure_rewinds.<locals>.MockFile.read  s!    ![[[rdii"r   c                    R V n         R# r  )r  )r_   offsets   &&r   seek>TestReadHtml.test_parse_failure_rewinds.<locals>.MockFile.seek  s	    #r   c                    R # )Trc   r\  s   &r   rj  BTestReadHtml.test_parse_failure_rewinds.<locals>.MockFile.seekable  s    r   c                    R # r"   rc   r\  s   &r   __next__BTestReadHtml.test_parse_failure_rewinds.<locals>.MockFile.__next__  s    r   c                    < V ^8  d   QhRS[ /# )rl   r~  r   )r{   rs  s   "r   r  r    s      ( r   c                    V # r"   rc   r\  s   &r   __iter__BTestReadHtml.test_parse_failure_rewinds.<locals>.MockFile.__iter__  s	     r   r  r"   )rl  rm  rn  ro  r  r   r  rj  r  r  rp  rq  rr  s   @r   MockFiler|    s-     $ $
$ $ r   r  z/<table><tr><td>spam<br />eggs</td></tr></table>z2<table><tr><td>spam<foobr />eggs</td></tr></table>Nrc   )r_   rZ   r  goodrw  s   &&   r   test_parse_failure_rewinds'TestReadHtml.test_parse_failure_rewinds  sF    	 	. IJKL%%%%$$$$r   c                ^    ! R  R\         P                  4      pV! RRRR4      pV! W$3R7      pV! W$3R7      pVP                  4        VP                  4        VP                  4       '       g   VP                  4       '       d   K.  RVP                  u;J d   VP                  J g   Q h Q hR# )c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )@TestReadHtml.test_importcheck_thread_safety.<locals>.ErrorThreadi  c                r   <  \         SV `  4        R V n        R #   \         d   pYn         R p?R # R p?ii ; ir"   )superrunerrr\  )r_   r  	__class__s   & r   r  DTestReadHtml.test_importcheck_thread_safety.<locals>.ErrorThread.run  s3    $GKM  $DH ! #"HH#s    616)r  )rl  rm  rn  ro  r  rp  rq  __classcell__)r  rs  s   @@r   ErrorThreadr    s     $ $r   r  r   r   r?   rR   )targetr2   N)	threadingThreadstartis_aliver  )r_   r   rZ   r  rT   helper_thread1helper_thread2s   &&&    r   test_importcheck_thread_safety+TestReadHtml.test_importcheck_thread_safety  s    
	$)** 	$ D&&2EF$,<;O$,<;O%%''>+B+B+D+D~))?^-?-??????r   c                    V! R RRR4      p\        V4      pV! V4      ^ ,          pV! V4      ^ ,          p\        P                  ! WV4       R# )r   r   r?   r@   N)r   r-   r.   )r_   r   rZ   file_path_string	file_pathr   r   s   &&&    r   test_parse_path_object#TestReadHtml.test_parse_path_object  sK    #D&&+F)*	/03y)!,
c'r   c                    V! \        R 4      4      ^ ,          p\        R..R.R7      p\        P                  ! W#4       R# )z
            <table>
                <tr>
                    <th>A</th>
                </tr>
                <tr>
                    <td>word1<br>word2</td>
                </tr>
            </table>
        zword1 word2rn  rp  Nrq  rr  s   &&  r   test_parse_br_as_space#TestReadHtml.test_parse_br_as_space  sF    !	
  M?"3cUC
f/r   c                   R pR. ROR. ROR. ROR. ROR. ROR. RO/pVR,          pVR,          pVR,          pVR8X  d   VR,          pVR,          pVR,          pM2VR	8X  d   VR,          pM!VR
8X  d   VR,          pMVR8X  d
   VR,          pV! \        V4      VR7      ^ ,          p\        WV.VR7      p	V	P                  \        P                  4      p	\
        P                  ! W4       R# )a  
          <table>
            <tr>
              <th>HTTP</th>
              <th>FTP</th>
              <th><a href="https://en.wiktionary.org/wiki/linkless">Linkless</a></th>
            </tr>
            <tr>
              <td><a href="https://en.wikipedia.org/">Wikipedia</a></td>
              <td>SURROUNDING <a href="ftp://ftp.us.debian.org/">Debian</a> TEXT</td>
              <td>Linkless</td>
            </tr>
            <tfoot>
              <tr>
                <td><a href="https://en.wikipedia.org/wiki/Page_footer">Footer</a></td>
                <td>
                  Multiple <a href="1">links:</a> <a href="2">Only first captured.</a>
                </td>
              </tr>
            </tfoot>
          </table>
          head_ignorehead_extractNbody_ignorebody_extractfooter_ignorefooter_extractr*   bodyr  r   extract_linksrn   )HTTPFTPLinkless))r  N)r  N)r  z'https://en.wiktionary.org/wiki/linkless)	WikipediaSURROUNDING Debian TEXTr  ))r  zhttps://en.wikipedia.org/)r  zftp://ftp.us.debian.org/)r  N)Footer$Multiple links: Only first captured.N))r  z)https://en.wikipedia.org/wiki/Page_footer)r  1N)r   r   fillnaru   r  r-   r.   )
r_   r  rZ   gh_13141_datagh_13141_expecteddata_expfoot_exphead_expr   r   s
   &&&       r   test_extract_linksTestReadHtml.test_extract_links  s   0 6 
 O 
  
  %
2 %]3$_5$]3%<(8H()9:H(8HF](8HH_()9:HH_(8H!(="9MaPh18D??266*
f/r   c                    R p\         P                  ! \        VR7      ;_uu_ 4        \        VRR7       RRR4       R#   + '       g   i     R# ; i)zY`extract_links` must be one of {None, "header", "footer", "body", "all"}, got "incorrect"r=   	incorrectr  NrC   rF   rM   r   )r_   re   r4   s   && r   test_extract_links_bad#TestReadHtml.test_extract_links_badG  s9    I 	 ]]:S11i{; 2111r9  c                    R pV! \        V4      RR7      ^ ,          p\        R..4      p\        P                  ! W44       R# )z
        <table>
          <tr>
            <td>
              <a href='https://google.com'>Google.com</a>
            </td>
          </tr>
        </table>
        r*   r  N)z
Google.comzhttps://google.comrq  r_   rZ   r   r   r   s   &&   r    test_extract_links_all_no_header-TestReadHtml.test_extract_links_all_no_headerO  s?     "(4.FqICDEF
f/r   c                    R p\         P                  ! \        VR7      ;_uu_ 4        \        RRR7       RRR4       R#   + '       g   i     R# ; i)zPdtype_backend numpy is invalid, only 'numpy_nullable' and 'pyarrow' are allowed.r=   testnumpyr   Nr  )r_   r4   s   & r   test_invalid_dtype_backend'TestReadHtml.test_invalid_dtype_backend^  s8    % 	 ]]:S11fG4 2111r9  c                    R pV! \        V4      4      ^ ,          p\        RR.RR..RR.R7      p\        P                  ! W44       R# )	a  
        <table>
            <tr>
                <th>
                    <style>.style</style>
                    A
                    </th>
                <th>B</th>
            </tr>
            <tr>
                <td>A1</td>
                <td>B1</td>
            </tr>
            <tr>
                <td>A2</td>
                <td>B2</td>
            </tr>
        </table>
        A1B1A2B2rn  ro  rp  Nrq  r  s   &&   r   test_style_tagTestReadHtml.test_style_tagf  sI    & "(4.1!4D$<$">c
S
f/r   rc   )r*   r  r   r  )grl  rm  rn  ro  r`   rC   fixturere   ri   r   r   marknetwork
single_cpur   r   slowr   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  r   r'  r*  r2  r7  r>  rA  rD  rH  rL  rO  rU  rY  r]  ra  rh  rk  rs  ry  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  parametrizer  r  r  r  r  r"  r/  r2  r5  r;  rE  r   rM  rQ  filterwarningsrd  rx  r  r  r  r  r  r  r  r  r  rp  rq  rr  s   @r   r\   r\   l   sn    8 ^^; ; ^^? ?'4Il [[[[)  )  [[[[)  ) [[) )/-
-

))))))))L)
)
)
)	))) [[[[D  D
 [[[[[[@   @
 [[- - [[  [[2 2 [[0 0 [[	0 	0 [[2 2 [[2 2 [[
2 
2 [[	- 	-D
 ^^. .` [[[[  
 [[[[.  . 60@040@$2L02 [[10 10f [[$ $F0P02!0F0@0:0*0608
0>X320: [[UT5M24 34060642040.4- [[X X
&3& [["E7D!)*Iug,>?	
!!> [[-e}=0 >0. [[	&	8"(%@ [[[[@  @.(0* [[U$GHB0 IB0H<050 0r   r\   )zchinese_utf-16.htmlzchinese_utf-32.htmlzchinese_utf-8.htmlzletz_latin1.html)1collections.abcr   	functoolsr   r   r   r   r.  pathlibr   rS  r  urllib.errorr	   r  ru   rC   pandas.compatr
   pandas.util._test_decoratorsutil_test_decoratorstdpandasrx   r   r   r   r   r   r   r   r   r   pandas._testing_testingr-   pandas.io.commonr   r  r   r8   rI   rO   rW   r   
skip_if_norZ   r\   rc   r   r   <module>r     s    $  
  	  !   - ) ) 
 
 
  - BB
:(M@. U2==#7z9R"STV2==#8944Q0 Q0r   