
    HR-e\                        d Z ddlmZ ddlZddlZddlmZ ddlm	Z	m
Z
 ddlmZ ddlmZmZ dd	lmZmZ erdd
lmZmZ ej                            e d          d             Zd Zej                            e d          d             Zej                            e d          d             Zej                            e d          d             Zej                            e d          d             Zej                            e d          d             Zej                            e d          d             Zej                            ed          d             Z ej                            e d          d             Z!ej                            e d          d             Z"ej                            e d          d             Z#ej                            e d          d             Z$d Z%ej                            e d          d             Z&d Z'ej                            e d          d             Z(ej                            e d          d              Z)ej                            e d          d!             Z*d" Z+d# Z,d$ Z-d% Z.d& Z/d' Z0ej                            e d          d(             Z1dS ))z
This module tests some of the methods related to the ``HTML``
reader/writer and aims to document its functionality.

Requires `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/>`_
to be installed.
    )StringION)ascii)corehtml)Table)
HAS_BLEACHHAS_BS4   )setup_functionteardown_function)BeautifulSoupFeatureNotFoundzrequires BeautifulSoup4)reasonc                      t          dd          } t          j        |           }t          |t                    sJ t          |t          j                  sJ |dk    sJ |j        | u sJ dS )zB
    Test to make sure the class SoupString behaves properly.
    z1<html><head></head><body><p>foo</p></body></html>html.parserN)r   r   
SoupString
isinstancestrsoup)r   soup_strs     @lib/python3.11/site-packages/astropy/io/ascii/tests/test_html.pytest_soupstringr      s     ;] D t$$Hh$$$$$h00000JJJJJ=D          c                      g } t          j        |           }t          d          D ]}|                    |           dD ]}|                    |           | g dk    sJ dS )zB
    Test to make sure the class ListWriter behaves properly.
       abcde)
r   r
            abcdeN)r   
ListWriterrangewrite)lstwriterichs       r   test_listwriterr,   +   s    
 C_S!!F1XX  Q  R:::::::::r   c                      t          dd          } t          j        | i d          du sJ t          j        di d          du sJ t          dd          j        } t          j        | i d          du sJ t          j        | i d          d	u sJ t          j        | d
did          du sJ t          j        | d
did          d	u sJ t          j        | d
did          du sJ t          j        | d
did          d	u sJ dS )z
    Test to make sure that identify_table() returns whether the
    given BeautifulSoup tag is the correct table to process.
    z<html><body></body></html>r   r   FNz><table id="foo"><tr><th>A</th></tr><tr><td>B</td></tr></table>r   r
   Ttable_idbarfoo)r   r   identify_tabletable)r   s    r   test_identify_tabler3   ;   sO    5}EEDtR++u4444tR++u4444H   	 tR++u4444tR++t3333 tj!_a88EAAAAtj!_a88D@@@@ tj%%8!<<EEEEtj%%8!<<DDDDDDr   c                     g d} t          j        | d          }|j        du sJ t          j        |d         j        ddgk              sJ |d         j        j        dk    sJ g d} t          j        | dd	g
          }|j        du sJ t          j        |d         j        ddgk              sJ |d         j        j        dk    sJ dS )z0
    Test reading a table with missing data
    )<table><tr><th>A</th></tr>z<tr><td></td></tr><tr><td>1</td></tr></table>
ascii.htmlformatFATr*   )r5   r6   z<tr><td>...</td></tr>r7   r8   )z...0)r;   fill_valuesN)r   readmaskednpallmaskdtypekindtable_indats     r   test_missing_datarI   W   s      H *Xl
3
3
3C:6#c(-D%=011111s8>#%%%%  H *Xl
O
O
OC:6#c(-D%=011111s8>#%%%%%%r   c                  D   g d} t          j        | dddg          }|j        ddgk    sJ t          |          dk    sJ t          j        | dddgdg          }|j        dgk    sJ t          |          dk    sJ t	          j        |d         dk              sJ d	S )
z0
    Test reading a table and renaming cols
    )r5   z<tr><th>A</th> <th>B</th></tr>z<tr><td>1</td><td>2</td></tr>r8   r9   Br<   r;   namesr
   )r;   rM   include_namesr   N)r   r?   colnameslenrA   rB   rF   s     r   test_rename_colsrQ   w   s    
  H *Xl3*
E
E
EC<C:%%%%s88q==== *c3Zu  C <C5    s88q====6#c(a-       r   c                      g d} t          j        | d          }|j        dgk    sJ t          |          dk    sJ t          j        | ddg          }|j        dgk    sJ t          |          dk    sJ dS )	z4
    Test reading a table with no column header
    )r5   r7   z<tr><td>2</td></tr>r8   r9   r:   col1r   r    rL   N)r   r?   rO   rP   rF   s     r   test_no_namesrT      s    
 UTTH
*Xl
3
3
3C<F8####s88q====
*Xl3%
@
@
@C<C5    s88q======r   c                     ddg} t          j        t          j                  5 }t	          j        | dddid           ddd           n# 1 swxY w Y   |                    d	          sJ t          j        t          j                  5 }t	          j        | ddd
id           ddd           n# 1 swxY w Y   |                    d          sJ dS )z\
    Raise an exception with an informative error message if table_id
    is not found.
    z#<table id="foo"><tr><th>A</th></tr>z<tr><td>B</td></tr></table>r9   r.   bad_idFr;   htmldictguessNz(ERROR: HTML table id 'bad_id' not found$r   z%ERROR: HTML table number 3 not found$)pytestraisesr   InconsistentTableErrorr   r?   match)rG   errs     r   test_identify_table_failr_      si    67TUH	t2	3	3 
s
\Z4JRW	
 	
 	
 	

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 99?@@@@@	t2	3	3 Ys
8LJ?RWXXXXY Y Y Y Y Y Y Y Y Y Y Y Y Y Y99<=======s#   A

AA
B11B58B5c                     dD ]4} 	 t          j        ddd| id           # t          $ r
 | dk    r Y 1w xY wt          j        t                    5  t          j        ddddid           d	d	d	           d	S # 1 swxY w Y   d	S )
z
    Make sure the user can specify which back-end parser to use
    and that an error is raised if the parser is invalid.
    )lxmlxmlr   html5libdata/html2.htmlr9   parserFrW   r   r0   N)r   r?   r   rZ   r[   )re   s    r   test_backend_parsersrf      s    = 
 
		J!#"F+	      	 	 	&& '&	 
	'	' 
 

&		
 	
 	
 	

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
s   !55A99A= A=zrequires no BeautifulSoup4c                      t          j                    } t          j        t          j                  5  |                     g            ddd           dS # 1 swxY w Y   dS )z_
    This should return an OptionalTableImportError if BeautifulSoup
    is not installed.
    N)r   HTMLInputterrZ   r[   r   OptionalTableImportErrorprocess_lines)inputters    r   test_htmlinputter_no_bs4rl      s      ""H	t4	5	5 # #r"""# # # # # # # # # # # # # # # # # #s   AAAc                  z   d} t          |           5 }|                                }ddd           n# 1 swxY w Y   t          j                    }i |_        g d}d |                    |          D             |k    sJ ddi|_        t          j        t          j                  5  |                    |           ddd           n# 1 swxY w Y   d|j        d<   g d}d	 |                    |          D             |k    sJ d
|j        d<   g d}d |                    |          D             |k    sJ dS )z
    Test to ensure that HTMLInputter correctly converts input
    into a list of SoupStrings representing table elements.
    data/html.htmlN)<<tr><th>Column 1</th><th>Column 2</th><th>Column 3</th></tr>*<tr><td>1</td><td>a</td><td>1.05</td></tr>z*<tr><td>2</td><td>b</td><td>2.75</td></tr>+<tr><td>3</td><td>c</td><td>-1.25</td></tr>c                 ,    g | ]}t          |          S  r   .0xs     r   
<listcomp>z%test_htmlinputter.<locals>.<listcomp>       666qCFF666r   r.   r   second)<<tr><th>Column A</th><th>Column B</th><th>Column C</th></tr>*<tr><td>4</td><td>d</td><td>10.5</td></tr>z*<tr><td>5</td><td>e</td><td>27.5</td></tr>+<tr><td>6</td><td>f</td><td>-12.5</td></tr>c                 ,    g | ]}t          |          S rs   rt   ru   s     r   rx   z%test_htmlinputter.<locals>.<listcomp>   ry   r   r   )*<tr><th>C1</th><th>C2</th><th>C3</th></tr>+<tr><td>7</td><td>g</td><td>105.0</td></tr>z+<tr><td>8</td><td>h</td><td>275.0</td></tr>,<tr><td>9</td><td>i</td><td>-125.0</td></tr>c                 ,    g | ]}t          |          S rs   rt   ru   s     r   rx   z%test_htmlinputter.<locals>.<listcomp>
  ry   r   )	openr?   r   rh   	get_linesrZ   r[   r   r\   )ffdr2   rk   expecteds        r   test_htmlinputterr      s    	A	a B		                ""HHM  H 76H..u55666(BBBB  OHM	t2	3	3 " "5!!!" " " " " " " " " " " " " " " !)HM*  H 76H..u55666(BBBB !"HM*  H 76H..u55666(BBBBBBs   377(C

CCc                  n   t          j                    } t          j        t          dd          j                  t          j        t          dd          j                  g}ddgddgg}t           | |                    |k    sJ |                    d           t          j        t                    5  t           | |                     d	d	d	           n# 1 swxY w Y   t          j        t          j                  5  t           | g                      d	d	d	           d	S # 1 swxY w Y   d	S )
z
    Test to make sure that HTMLSplitter correctly inputs lines
    of type SoupString to return a generator that gives all
    header and data elements.
    z4<table><tr><th>Col 1</th><th>Col 2</th></tr></table>r   z6<table><tr><td>Data 1</td><td>Data 2</td></tr></table>zCol 1zCol 2zData 1zData 2z'<tr><td>Data 3</td><td>Data 4</td></tr>N)r   HTMLSplitterr   r   trlistappendrZ   r[   	TypeErrorr   r\   )splitterlinesexpected_datas      r   test_htmlsplitterr     s     ""H 	F 	
 	

 	H- 	
 	
E w'(H)=>M  M1111 
LL:;;;	y	!	!  XXe__               
t2	3	3  XXb\\                 s$   6CC"CD**D.1D.c                     d} t          |           5 }|                                }ddd           n# 1 swxY w Y   t          j                    }i |_        t          j                    }|                    |          }t          ||                    |                             dk    sJ d|j        d<   |                    |          }t          ||                    |                             dk    sJ d|j        d<   |                    |          }t          ||                    |                             dk    sJ t          j        t          d	d
          j
                  t          j        t          dd
          j                  g}|                    |          J |                    d           t          j        t                    5  |                    |           ddd           dS # 1 swxY w Y   dS )z
    Test to ensure that the start_line method of HTMLHeader
    returns the first line of header data. Uses t/html.html
    for sample input.
    rn   Nro   rz   r.   r{   r   r   z%<table><tr><td>Data</td></tr></table>r   <p>Text</p>z<tr><th>Header</th></tr>)r   r?   r   rh   
HTMLHeaderr   r   
start_liner   r   r   pr   rZ   r[   r   )r   r   r2   rk   headerr   s         r   test_htmlheader_startr   0  s    	A	a B		                ""HHM_Fu%%EE&##E**+,,I	J 	J 	J 	J !)HM*u%%EE&##E**+,,I	J 	J 	J 	J !"HM*u%%EE&##E**+,,7	8 	8 	8 	8 	A=QQT	
 	
 	m]CCEFF	E U##+++ 
LL+,,,	y	!	! ! !%   ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !s   377G>>HHc                  ^   d} t          |           5 }|                                }ddd           n# 1 swxY w Y   t          j                    }i |_        t          j                    }|                    |          }t          ||                    |                             dk    sJ t          ||                    |          dz
                     dk    sJ d|j        d<   |                    |          }t          ||                    |                             dk    sJ t          ||                    |          dz
                     d	k    sJ d
|j        d<   |                    |          }t          ||                    |                             dk    sJ t          ||                    |          dz
                     dk    sJ t          j	        t          dd          j                  t          j	        t          dd          j                  g}t          j        t          j                  5  |                    |           ddd           n# 1 swxY w Y   |                    |          J |                    d           t          j        t$                    5  |                    |           ddd           n# 1 swxY w Y   t          j        t$                    5  |                    |           ddd           dS # 1 swxY w Y   dS )z
    Test to ensure that the start_line and end_lines methods
    of HTMLData returns the first line of table data. Uses
    t/html.html for sample input.
    rn   Nrp   r
   rq   rz   r.   r|   r}   r   r   r   z<div></div>r   r   z<tr><td>Data</td></tr>)r   r?   r   rh   HTMLDatar   r   r   end_liner   r   divr   rZ   r[   r   r\   r   r   )r   r   r2   rk   datar   s         r   test_htmldatar   a  s    	A	a B		                ""HHM=??Du%%EE$//%(()**7	8 	8 	8 	8
 	E$--&&*+,,8	9 	9 	9 	9 !)HM*u%%EE$//%(()**7	8 	8 	8 	8 	E$--&&*+,,8	9 	9 	9 	9 !"HM*u%%EE$//%(()**8	9 	9 	9 	9 	E$--&&*+,,9	: 	: 	: 	: 	m]CCGHHm]CCEFFE 
t2	3	3                 ==''' 
LL)***	y	!	!                	y	!	!  e                 sB   377I))I-0I-9KK"K?L""L&)L&c                      g d} g d}g d}t          | ||gd          }d}t          j                                        |          d                                         }||                                k    sJ dS )	
    Test to make sure that the HTML writer writes multidimensional
    columns (those with iterable elements) using the colspan
    attribute of <th>.
    r
   r   r   )      ?r   )       @r   )      @r   )r    r    r    r!   r!   r!   r"   r"   r"   C1C2C3rM   al  <html>
 <head>
  <meta charset="utf-8"/>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-type"/>
 </head>
 <body>
  <table>
   <thead>
    <tr>
     <th>C1</th>
     <th colspan="2">C2</th>
     <th colspan="3">C3</th>
    </tr>
   </thead>
   <tr>
    <td>1</td>
    <td>1.0</td>
    <td>1.0</td>
    <td>a</td>
    <td>a</td>
    <td>a</td>
   </tr>
   <tr>
    <td>2</td>
    <td>2.0</td>
    <td>2.0</td>
    <td>b</td>
    <td>b</td>
    <td>b</td>
   </tr>
   <tr>
    <td>3</td>
    <td>3.0</td>
    <td>3.0</td>
    <td>c</td>
    <td>c</td>
    <td>c</td>
   </tr>
  </table>
 </body>
</html>
    r   Nr   r   HTMLr'   striprS   col2col3r2   r   outs         r   test_multicolumn_writer     s     99D///D>>>D4t$,>???E*HV )++

E
"
"1
%
+
+
-
-C(..""""""""r   zrequires bleachc                     g d} g d}g d}t          | ||gd          }d}t          j        ddi	                              |          d
                                         }||                                k    sJ dS )r   r   r   ))<a></a>r   r    )z<b></b>r!   r!   r   r   r   a~  <html>
 <head>
  <meta charset="utf-8"/>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-type"/>
 </head>
 <body>
  <table>
   <thead>
    <tr>
     <th>C1</th>
     <th colspan="2">C2</th>
     <th colspan="3">C3</th>
    </tr>
   </thead>
   <tr>
    <td>1</td>
    <td>1.0</td>
    <td>1.0</td>
    <td><a></a></td>
    <td><a></a></td>
    <td>a</td>
   </tr>
   <tr>
    <td>2</td>
    <td>2.0</td>
    <td>2.0</td>
    <td><b></b></td>
    <td>b</td>
    <td>b</td>
   </tr>
   <tr>
    <td>3</td>
    <td>3.0</td>
    <td>3.0</td>
    <td>c</td>
    <td>c</td>
    <td>c</td>
   </tr>
  </table>
 </body>
</html>
    raw_html_colsr   )rX   r   Nr   r   s         r   test_multicolumn_write_escaper     s     99D///DPPPD4t$,>???E*HV )ot4
5
5
5
;
;E
B
B1
E
K
K
M
MC(..""""""""r   c                      g d} g d}g d}t          | ||gd          }d}t          j        ddi                              |          d	                                         |                                k    sJ d
S )z
    Test to make sure that the HTML writer will not use
    multi-dimensional columns if the multicol parameter
    is False.
    r   r   r   r   r   a  <html>
 <head>
  <meta charset="utf-8"/>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-type"/>
 </head>
 <body>
  <table>
   <thead>
    <tr>
     <th>C1</th>
     <th>C2</th>
     <th>C3</th>
    </tr>
   </thead>
   <tr>
    <td>1</td>
    <td>1.0 .. 1.0</td>
    <td>a .. a</td>
   </tr>
   <tr>
    <td>2</td>
    <td>2.0 .. 2.0</td>
    <td>b .. b</td>
   </tr>
   <tr>
    <td>3</td>
    <td>3.0 .. 3.0</td>
    <td>c .. c</td>
   </tr>
  </table>
 </body>
</html>
    multicolFr   Nr   )rS   r   r   r2   r   s        r   test_write_no_multicolsr     s     99D///D>>>D4t$,>???E!HD 9j%())//66q9??AAX^^EUEUUUUUUUr   c                      t          j        dd          } t          j        t          df          }t          t          j        ddgdfddgd	fgd
|dfdg                    }t          j        | |k              sJ dS )a'  
    Test to make sure that the HTML reader inputs multidimensional
    columns (those with iterable elements) using the colspan
    attribute of <th>.

    Ensure that any string element within a multidimensional column
    casts all elements to string prior to type conversion operations.
    rd   r9   r:      1z2.5000000000000000001r   1ag      @r<   )r   )rK   z<f8)rD   N)r   r?   rA   rD   r   arrayrB   )r2   str_typer   s      r   test_multicolumn_readr   J  s     J(>>>Exb	""H
+,a0D#;2DE4(,7	
 	
 	
 H 6%8#$$$$$$$r   c                     t          dgdggddg          } t                      }|                     |dddi           d	}||                                v sJ t                      }|                     |dddgi           ||                                v sJ t                      }|                     |ddddgi           d
}||                                v sJ dS )F
    Test that columns can contain raw HTML which is not escaped.
    z
<em>x</em>
<em>y</em>r    r!   r   r9   r   r;   rX   zL   <tr>
    <td><em>x</em></td>
    <td>&lt;em&gt;y&lt;/em&gt;</td>
   </tr>z@   <tr>
    <td><em>x</em></td>
    <td><em>y</em></td>
   </tr>N)r   r   r'   getvalue)tr   r   s      r   test_raw_html_writer   `  s   
 	~~.sCjAAAA **CGGC/EGFFFH
 s||~~%%%% **CGGC#/GGHHHs||~~%%%% **CGGC#s/LGMMMH
 s||~~%%%%%%r   c            	         ddl } t          dgdgdggg d          }t                      }|                    |dd	|j        i
           d}||                                v sJ t                      }|                    |d|j        dt          | j                  dgz   id
           d}||                                v sJ dS )r   r   Nz<script>x</script>z<p>y</p>r   )r    r!   r"   r   r9   r   r   zv   <tr>
    <td>&lt;script&gt;x&lt;/script&gt;</td>
    <td>&lt;p&gt;y&lt;/p&gt;</td>
    <td><em>y</em></td>
   </tr>tagsr   )r   raw_html_clean_kwargszj   <tr>
    <td>&lt;script&gt;x&lt;/script&gt;</td>
    <td><p>y</p></td>
    <td><em>y</em></td>
   </tr>)bleachr   r   r'   rO   r   r   ALLOWED_TAGS)r   r   r   r   s       r   test_raw_html_write_cleanr     s   
 MMM
	*~>ooo	 	 	A
 **CGGC/LGMMMH s||~~%%%% **CGGZ&,d63F.G.G3%.O%P
 
    H s||~~%%%%%%r   c                  H   t                      } t          dgdggd          }t          j        || dd           t          dgdggd          }t                      }t          j        ||d	           |                                 |                                k    sJ d
S )zG
    Test that passing fill_values should replace any matching row
    r
   r   r    r!   r   )r   Hello worldr   r>   r;   r   r:   Nr   r   r   r'   r   buffer_outputr   
t_expectedbuffer_expecteds       r   !test_write_table_html_fill_valuesr     s     JJMsQCj
+++A	K=.B6RRRR!-Z@@@JjjO	K
OF;;;;!!##'?'?'A'AAAAAAAr   c                  H   t                      } t          dgdggd          }t          j        || dd           t          dgdggd          }t                      }t          j        ||d           |                                 |                                k    sJ d	S )
zc
    Test that passing optional column in fill_values should only replace
    matching columns
    r
   r   r   )r   r   r!   r   r   r   r:   Nr   r   s       r   2test_write_table_html_fill_values_optional_columnsr     s    
 JJMsQCj
+++A	K=.GPVWWWWm_-Z@@@JjjO	K
OF;;;;!!##'?'?'A'AAAAAAAr   c                     t                      } t          dgdggddd          }t          j        j        |d<   t          j        || t
          j        dfd	           t          dgdggd
          }t                      }t          j        ||d           |                                 |                                k    sJ dS )zi
    Test that passing masked values in fill_values should only replace
    masked columns or values
    r
   r   T)i4i8)rM   r@   rD   r    TESTr   r   r   r:   N)r   r   rA   mar@   r   r'   r   r   s       r   (test_write_table_html_fill_values_maskedr     s    
 JJMsQCj
4|LLLAU\AcF	K=u|V.DVTTTT1#j999JjjO	K
OF;;;;!!##'?'?'A'AAAAAAAr   c                  t   g d} g d}g d}t                      }t          | ||gd          }t          j        ||dd           g d} g d}g d	}t                      }t          | ||gd          }t          j        ||d
           |                                |                                k    sJ dS )zy
    Test to make sure that the HTML writer writes multidimensional
    columns with correctly replaced fill_values.
    r   r   r   r   r   )r    zr   r   ))r   r   r   r   r   r:   Nr   )rS   r   r   r   r   r   r   s          r   'test_multicolumn_table_html_fill_valuesr     s    
 99D///D>>>DJJMtT4 (:;;;A	K=jHHHH99D///D>>>DjjOdD)1CDDDJ	K
OF;;;;!!##'?'?'A'AAAAAAAr   c                     t                      } t          g dg dgdd          }t          j        j        |d         dd<   t          j        j        |d	         dd<   t          j        || t
          j        d
fgd           t          g dg dgd          }t                      }t          j        ||d           t          |                                           |                                 |                                k    sJ dS )z
    Test that passing masked values in fill_values should only replace
    masked columns or values for multidimensional tables
    )r
   r   r   r   )--r    r   r!   r   T)rM   r@   r    r   r   r!   MASKEDr   r   )r   r   r   r   )r   r   r   r!   r   r:   N)	r   r   rA   r   r@   r   r'   printr   r   s       r   5test_multi_column_write_table_html_fill_values_maskedr     s   
 JJM|||3334JtTTTA%,AcF1Q3K%,AcF1Q3K	K=h/G.HQWXXXX	#	#	#%D%D%DEZ  J jjO	K
OF;;;;	/
"
"
$
$%%%!!##'?'?'A'AAAAAAAr   c                  j   ddg} ddg}ddd}t          | |g|                                          }d	}t                      5 }|                    |d
|           |                                                                }ddd           n# 1 swxY w Y   ||                                k    sJ dS )z^
    Test to make sure that the HTML writer writes out using the
    supplied formatting.
    r
   r   gz#э%=g  ,l04dz.2e)r   r   r   ai  <html>
 <head>
  <meta charset="utf-8"/>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-type"/>
 </head>
 <body>
  <table>
   <thead>
    <tr>
     <th>C1</th>
     <th>C2</th>
    </tr>
   </thead>
   <tr>
    <td>0001</td>
    <td>1.23e-11</td>
   </tr>
   <tr>
    <td>0002</td>
    <td>-9.88e+11</td>
   </tr>
  </table>
 </body>
</html>
    r   )r;   formatsN)r   keysr   r'   r   r   )rS   r   r   r2   r   spr   s          r   "test_write_table_formatted_columnsr     s     q6D,'D%((G4,gllnn555EH4 
 $rBvw777kkmm!!##$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ (..""""""""s   ?BBBc                  ~    g d} t          j        | d          }t          j        |d         ddgk              sJ dS )z8
    Test reading an HTML table with unicode values
    )r5   z<tr><td>&#x0394;</td></tr>u   <tr><td>Δ</td></tr>r8   r9   r:   rS   u   ΔN)r   r?   rA   rB   rF   s     r   test_read_html_unicoder   2  sR    
  H *Xl
3
3
3C6#f+$-.......r   )2__doc__ior   numpyrA   rZ   
astropy.ior   astropy.io.asciir   r   astropy.tabler   "astropy.utils.compat.optional_depsr   r	   commonr   r   bs4r   r   markskipifr   r,   r3   rI   rQ   rT   r_   rf   rl   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rs   r   r   <module>r      s                     ' ' ' ' ' ' ' '       B B B B B B B B 5 5 5 5 5 5 5 5
 322222222 K(ABB! ! CB!; ; ;  K(ABBE E CBE6 K(ABB& & CB&> K(ABB! ! CB!2 K(ABB  CB K(ABB> > CB>$ K(ABB
 
 CB
8 G$@AA# # BA# K(ABB-C -C CB-C` K(ABB  CBD K(ABB-! -! CB-!` K(ABB@ @ CB@F7# 7# 7#t 
N+<==7# 7# >=7#t-V -V -V` K(ABB% % CB%* 
N+<==& & >=&@ 
N+<==%& %& >=%&PB B BB B B B B B"B B B0B B B*(# (# (#V K(ABB/ / CB/ / /r   