o
    �¨ÊhB  ã                   @   sœ   d Z ddlmZ ddlZddlZddlmZmZ ddl	m
Z ej d¡Zej d¡Zeej ddd	g¡d
d„ ƒƒZeej ddd	g¡dd„ ƒƒZ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)Ú	DataFrameÚoption_contextz=ignore:Passing a BlockManager to DataFrame:DeprecationWarningÚpyarrow_xfailÚ	na_filterTFc                 C   sP   | }d}t dtdƒtdƒgd ig d¢d�}|jt|ƒd|d	�}t ||¡ d S )
NzE,A
a,inf
b,-inf
c,+Inf
d,-Inf
e,INF
f,-INF
g,+INf
h,-INf
i,inF
j,-inFÚAÚinfz-infé   )
ÚaÚbÚcÚdÚeÚfÚgÚhÚiÚj©Úindexr   ©Ú	index_colr   ©r   ÚfloatÚread_csvr   ÚtmÚassert_frame_equal©Úall_parsersr   ÚparserÚdataÚexpectedÚresult© r#   úX/var/www/html/env/lib/python3.10/site-packages/pandas/tests/io/parser/common/test_inf.pyÚtest_inf_parsing   s   þr%   c                 C   sR   | }d}t dtdƒtdƒtdƒgig d¢d�}|jt|ƒd|d	�}t ||¡ d S )
Nz&,A
a,Infinity
b,-Infinity
c,+Infinity
r   Úinfinityz	-infinityz	+infinity)r
   r   r   r   r   r   r   r   r#   r#   r$   Útest_infinity_parsing/   s   þr'   c              	   C   s®   | }d}d}t }|jdkrt tf}tj||dd��& tddƒ� |jt|ƒd d�}W d   ƒ n1 s3w   Y  W d   ƒ n1 sBw   Y  td	t	j
d
gƒ}t ||¡ d S )Nz1.0
NaN
3.0z"use_inf_as_na option is deprecatedÚpyarrowF)ÚmatchÚcheck_stacklevelÚuse_inf_as_naT)Úheaderg      ð?g      @)ÚFutureWarningÚengineÚDeprecationWarningr   Úassert_produces_warningr   r   r   r   ÚnpÚnanr   )r   r   r    ÚmsgÚwarnr"   r!   r#   r#   r$   Ú test_read_csv_with_use_inf_as_naA   s   
ÿ€ÿr5   )Ú__doc__Úior   Únumpyr1   ÚpytestÚpandasr   r   Úpandas._testingÚ_testingr   ÚmarkÚfilterwarningsÚ
pytestmarkÚusefixturesÚxfail_pyarrowÚparametrizer%   r'   r5   r#   r#   r#   r$   Ú<module>   s"    ÿ