o
    _~#g                     @   s   d dl Z d dlZd dlZd dlmZ d dlZd dlm	Z
 ed e r(ejjZejdddd Zdd	 Zd
d Zdd Zdd Zdd ZdS )    N)is_platform_windowsodfT)autousec                 C   s4   t jtjdd}| td| | |ddd d S )Nr   )engine
read_exceliodataexcel)	functoolspartialpdr   setattrchdir)monkeypatchdatapathfunc r   /var/www/static.ux5.de/https/Moving-Object-Detection-with-OpenCV/env/lib/python3.10/site-packages/pandas/tests/io/excel/test_odf.pycd_and_set_engine   s   r   c                   C   s>   t jtdd td W d    d S 1 sw   Y  d S )Nz"Unrecognized type awesome_new_type)matchzinvalid_value_type.ods)pytestraises
ValueErrorr   r   r   r   r   r   test_read_invalid_types_raises   s   "r   c                  C   sd   t jg ddd} t jdtjdgdtjdgdtjd	gg| g d
d}t jdddd}t|| d S )N)zRow 1zRow 2zRow 3Header)name               	   )Column 1z
Unnamed: 2Column 3)indexcolumnszwritertable.odtTable1r   )
sheet_name	index_col)r   Index	DataFramenpnanr   tmassert_frame_equal)r$   expectedresultr   r   r   test_read_writer_table   s    r1   c                  C   sD   t jg dtjtjdgg dgg dd} t d}t||  d S )N)g      ?g      @r   r   )g      @g      @r!   )r"   zColumn 2r#   r%   ztest_newlines.odsr   r*   r+   r,   r   r-   r.   r/   r0   r   r   r   -test_read_newlines_between_xml_elements_table.   s   
r5   c                  C   s8   t jdtjdtjdgdgd} t d}t||  d S )Nr   r       r"   r2   ztest_unempty_cells.odsr3   r4   r   r   r   test_read_unempty_cells:   s   
r7   c                  C   s2   t jdtjdgdgd} t d}t||  d S )Ntestztest 3r"   r2   ztest_cell_annotation.odsr3   r4   r   r   r   test_read_cell_annotationE   s   

r9   )r
   numpyr+   r   pandas.compatr   pandasr   pandas._testing_testingr-   importorskipmark
single_cpu
pytestmarkfixturer   r   r1   r5   r7   r9   r   r   r   r   <module>   s     


