o
    5ch                     @   s   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	 ddl
mZ ejdZdd Zd	d
 Zejdg ddd Zejdddgdd ZdS )zy
Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.
    )StringION)is_platform_linux)	DataFramepyarrow_skipc                 C   sD   | }d}|j t|d d}tdd |dD g}t|| d S )Nz45e-1,4.5,45.,inf,-inf)headerc                 S   s   g | ]}t |qS  )float).0sr   r   ^/var/www/html/gps/gps/lib/python3.10/site-packages/pandas/tests/io/parser/common/test_float.py
<listcomp>   s    z%test_float_parser.<locals>.<listcomp>,)read_csvr   r   splittmassert_frame_equal)all_parsersparserdataresultexpectedr   r   r   test_float_parser   s
   r   c                 C   sR   t dgdgdgdgd}|jdd}| \}}|jt||d}t|| d S )	N2e3E42e632E)wxyzF)indexfloat_precision)r   	from_dictto_csvr   r   r   r   )all_parsers_all_precisionsdfr   r   	precisiondf_roundtripr   r   r   test_scientific_no_exponent   s
   r)   neg_exp)ii`yl;c                 C   sB   | \}}d| }|j t||d}tddgi}t|| d S )Ndata
10Er!   r           )r   r   r   r   r   )r%   r*   r   r'   r   r   r   r   r   r   test_very_negative_exponent&   s
   
r-   exp   NZolNZoc           
      C   s   | \}}d| }|j t||d}|dkr;|dkr*t r*tjjdd}|j| |dkr1tj	nd}t
d	|gi}	n
t
d	d
| gi}	t||	 d S )Nr+   r!   
round_tripr/   z%GH38794, on Linux gives object result)reasonr   r,   r   10E)r   r   r   pytestmarkxfailnode
add_markernpinfr   r   r   )
r%   r.   requestr   r'   r   r   r4   valuer   r   r   r   test_too_many_exponent_digits1   s   
r<   )__doc__ior   numpyr8   r3   pandas.compatr   pandasr   pandas._testing_testingr   r4   usefixtures
pytestmarkr   r)   parametrizer-   r<   r   r   r   r   <module>   s    



