a
    DBìj
  ã                	   @   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ej d¡Zej d¡Zed	d
„ ƒZdd„ Zej dddejdejjd�g¡dd„ ƒZejje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=ignore:Passing a BlockManager to DataFrame:DeprecationWarningZpyarrow_xfailZ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   úg/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/pandas/tests/io/parser/common/test_float.pyÚ
<listcomp>   ó    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_expi—ýÿÿi`yþÿlüÿÿÿÿ;á)Zmarksc                 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ì   ÿÇNÎZolüÿÿÿÿÇNÎZoc           
      C   s˜   | \}}d|› �}|j t|ƒ|d�}|dkrt|dkrRtƒ rRtjjdd�}| |¡ |dkr`t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xfailZapplymarkerÚnpÚinfr   r   r   )
r   r%   Úrequestr   r   r   r   r)   Úvaluer   r   r   r
   Útest_too_many_exponent_digits=   s    

r.   )Ú__doc__Úior   Únumpyr*   r(   Zpandas.compatr   Zpandasr   Zpandas._testingZ_testingr   r)   ÚfilterwarningsZ
pytestmarkZusefixturesZxfail_pyarrowZskip_pyarrowr   r    ZparametrizeÚparamZ
skip_ubsanr$   r.   r   r   r   r
   Ú<module>   s4   ÿ


ýþ

