U
    Mfh                     @   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dddg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)	DataFrameZ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   L/tmp/pip-unpacked-wheel-eb6vo0j3/pandas/tests/io/parser/common/test_float.py
<listcomp>   s     z%test_float_parser.<locals>.<listcomp>,)read_csvr   r   splittmassert_frame_equal)Z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 )	NZ2eZ3EZ42eZ632E)wxyzF)indexZfloat_precision)r   	from_dictZto_csvr   r   r   r   )all_parsers_all_precisionsZdfr   r   	precisionZdf_roundtripr   r   r
   test_scientific_no_exponent   s
    r   neg_expii`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rv|dkrTt rTtjjdd}|j| |dkrbtj	nd}t
d	|gi}	nt
d	d
| gi}	t||	 d S )Nr!   r   Z
round_tripr%   z%GH38794, on Linux gives object result)reasonr   r"   r   Z10E)r   r   r   pytestmarkZxfailnodeZ
add_markernpinfr   r   r   )
r   r$   requestr   r   r   r   r(   valuer   r   r   r
   test_too_many_exponent_digits1   s    
r.   )__doc__ior   Znumpyr*   r'   Zpandas.compatr   Zpandasr   Zpandas._testingZ_testingr   r(   ZusefixturesZ
pytestmarkr   r   Zparametrizer#   r.   r   r   r   r
   <module>   s   



