o
    _~#g	                     @   sF   d dl Z d dlZd dlmZ e dZe jdd Z	G dd dZ
dS )    Ntablesc                 c   s    t jddt jdddt jddd}d}|ddd|d d	dd|d d
dd|d dddg}d}| d }t j|dd(}|jd||d}|D ]}| D ]	\}	}
|
|j|	< qP|j  qJW d   n1 sjw   Y  ||t	
|fV  dS )z4
    Use PyTables to create a simple HDF5 file.
    r   )pos         )c0c1c2g   $CAaaaaabbbbbccccci    dddddl    pandas_test_timeserieszwritten_with_pytables.h5w)mode/)namedescriptionN)r   	Time64Col	StringColInt64Col	open_filecreate_tableitemsrowappendpd	DataFrame)tmp_pathtable_schemat0testsamplesobjnamepathftsamplekeyvalue r*   /var/www/static.ux5.de/https/Moving-Object-Detection-with-OpenCV/env/lib/python3.10/site-packages/pandas/tests/io/pytables/test_compat.pypytables_hdf5_file	   s,   


r,   c                   @   s0   e Zd ZdZdd Zdd Zdd Zdd	 Zd
S )TestReadPyTablesHDF5z
    A group of tests which covers reading HDF5 files written by plain PyTables
    (not written by pandas).

    Was introduced for regression-testing issue 11188.
    c                 C   s0   |\}}}t j||d}|}tj||dd d S )N)r(   Tcheck_index_type)r   read_hdftmassert_frame_equalselfr,   r$   r#   dfresultexpectedr*   r*   r+   test_read_complete2   s   
z'TestReadPyTablesHDF5.test_read_completec                 C   sB   |\}}}t j||dd}|dd  jdd}tj||dd d S )Nr   )r(   startTdropr.   r   r0   reset_indexr1   r2   r3   r*   r*   r+   test_read_with_start8      
z)TestReadPyTablesHDF5.test_read_with_startc                 C   sB   |\}}}t j||dd}|d d jdd}tj||dd d S )Nr   )r(   stopTr:   r.   r<   r3   r*   r*   r+   test_read_with_stop?   r?   z(TestReadPyTablesHDF5.test_read_with_stopc                 C   sD   |\}}}t j||ddd}|dd jdd}tj||dd d S )Nr   r   )r(   r9   r@   Tr:   r.   r<   r3   r*   r*   r+   test_read_with_startstopF   s   
z-TestReadPyTablesHDF5.test_read_with_startstopN)__name__
__module____qualname____doc__r8   r>   rA   rB   r*   r*   r*   r+   r-   *   s    r-   )pytestpandasr   pandas._testing_testingr1   importorskipr   fixturer,   r-   r*   r*   r*   r+   <module>   s    

 