U
    e»{jÚ  ã                   @   s6  d dl Zd dlZd dlmZmZ d dlmZ d dlm	Z	 d dl
mZ dddd	d
gZe	r`e d¡ ej de¡dd„ ƒZdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zejje	 dd �d!d"„ ƒZejje	 dd �d#d$„ ƒZd%d&„ Zd'd(„ Zd)d*„ Zd+d,„ Zd-d.„ Z d/d0„ Z!d1d2„ Z"d3d4„ Z#d5d6„ Z$dS )7é    N)ÚColumnÚTable)Úsimple_table)ÚHAS_BS4)Úget_pkg_data_filenameúdata/cds.datúdata/ipac.datúdata/daophot.datúdata/latex1.texúdata/simple_csv.csvúdata/html.htmlÚfilenamec                 C   s   t jt| ƒdd� d S )NÚascii©Úformat©r   Úreadr   )r   © r   úb/var/www/html/bwave/python/venv/lib/python3.8/site-packages/astropy/io/ascii/tests/test_connect.pyÚtest_read_generic   s    r   c                 C   sL   t ƒ }| tddddgd�¡ | tddddgd�¡ |j| d d	d
� d S )NÚaé   é   é   ©ÚnameÚdataÚbÚcÚtestr   r   ©r   Ú
add_columnr   Úwrite)Útmp_pathÚtr   r   r   Útest_write_generic   s    r%   c                   C   s   t jtdƒdd� d S )Nr   Zipacr   r   r   r   r   r   Útest_read_ipac#   s    r&   c                   C   s   t jtdƒdd� d S )Nr   Zcdsr   r   r   r   r   r   Útest_read_cds'   s    r'   c                   C   s   t jtdƒdd� d S )Nr	   Zdaophotr   r   r   r   r   r   Útest_read_dapphot+   s    r(   c                   C   s   t jtdƒdd� d S )Nr
   Úlatexr   r   r   r   r   r   Útest_read_latex/   s    r*   c                   C   s   t  tdƒ¡ d S )Nr
   r   r   r   r   r   Útest_read_latex_noformat3   s    r+   c                 C   sP   t ƒ }| tddddgd�¡ | tddddgd�¡ | d }|j|d	d
� d S )Nr   r   r   r   r   r   r   údata.texr)   r   r    ©r#   r$   Úpathr   r   r   Útest_write_latex7   s
    r/   c                 C   sL   t ƒ }| tddddgd�¡ | tddddgd�¡ | d }| |¡ d S )	Nr   r   r   r   r   r   r   r,   r    r-   r   r   r   Útest_write_latex_noformat?   s
    r0   zrequires BeautifulSoup4)Úreasonc                   C   s   t jtdƒdd� d S )Nr   Úhtmlr   r   r   r   r   r   Útest_read_htmlG   s    r3   c                   C   s   t  tdƒ¡ d S )Nr   r   r   r   r   r   Útest_read_html_noformatL   s    r4   c                 C   sP   t ƒ }| tddddgd�¡ | tddddgd�¡ | d }|j|d	d
� d S )Nr   r   r   r   r   r   r   ú	data.htmlr2   r   r    r-   r   r   r   Útest_write_htmlQ   s
    r6   c                 C   sL   t ƒ }| tddddgd�¡ | tddddgd�¡ | d }| |¡ d S )	Nr   r   r   r   r   r   r   r5   r    r-   r   r   r   Útest_write_html_noformatY   s
    r7   c                   C   s   t jtdƒdd� d S )Núdata/short.rdbÚrdbr   r   r   r   r   r   Útest_read_rdba   s    r:   c                   C   s   t  tdƒ¡ d S )Nr8   r   r   r   r   r   Útest_read_rdb_noformate   s    r;   c                 C   sP   t ƒ }| tddddgd�¡ | tddddgd�¡ | d }|j|d	d
� d S )Nr   r   r   r   r   r   r   údata.rdbr9   r   r    r-   r   r   r   Útest_write_rdbi   s
    r=   c                 C   sL   t ƒ }| tddddgd�¡ | tddddgd�¡ | d }| |¡ d S )	Nr   r   r   r   r   r   r   r<   r    r-   r   r   r   Útest_write_rdb_noformatq   s
    r>   c                   C   s   t  tdƒ¡ dS )úWIf properly registered, filename should be sufficient to specify format

    #3189
    r   Nr   r   r   r   r   Útest_read_csvy   s    r@   c                 C   sL   t ƒ }| tddddgd�¡ | tddddgd�¡ | d }| |¡ d	S )
r?   r   r   r   r   r   r   r   zdata.csvNr    r-   r   r   r   Útest_write_csv�   s
    rA   c                 C   s8   t ƒ }| d }| |¡ t |¡}t ||k¡s4t‚d S )NztmpFile.ecsv)r   r"   r   r   ÚnpÚallÚAssertionError)r#   ZtblZtmpfileZtbl2r   r   r   Útest_auto_identify_ecsv�   s
    

rE   )%ÚnumpyrB   ZpytestZastropy.tabler   r   Zastropy.table.table_helpersr   Z"astropy.utils.compat.optional_depsr   Zastropy.utils.datar   ÚfilesÚappendÚmarkZparametrizer   r%   r&   r'   r(   r*   r+   r/   r0   Zskipifr3   r4   r6   r7   r:   r;   r=   r>   r@   rA   rE   r   r   r   r   Ú<module>   sH   û	



