
    h`                       S SK Jr  S SKrS SKJr  S SKJr  S SKJr  S SK	J
r
  \R                  " \5         S SKJr  SSS5        SS jr\" S	S
SS9\" SSSS9\" SSSS9SSSSSSSS.                   SS jj5       5       5       r\" S	S
SS9\" SSSS9\" SSSS9SSSSSSSS.                   SS jj5       5       5       rg! , (       d  f       N= f)    )annotationsN)Any)deprecate_renamed_parameter)Series)raise_assertion_error)assert_series_equal_pyc                    Sn[        U [        5      (       a  [        U[        5      (       d4  [        SS[        U 5      R                  [        U5      R                  5        g)NTinputszunexpected input types)
isinstancer   r   type__name__)leftright__tracebackhide__s      W/home/james-whalen/.local/lib/python3.13/site-packages/polars/testing/asserts/series.py_assert_correct_input_typer      sN    tV$$E6)B)B$JK  		
     check_dtypecheck_dtypesz0.20.31)versionrtolrel_tolz1.32.3atolabs_tolTFgh㈵>g:0yE>r   check_namescheck_ordercheck_exactr   r   categorical_as_strc               h    Sn	[        X5        [        U R                  UR                  UUUUUUUS9	  g)ah  
Assert that the left and right Series are equal.

Raises a detailed `AssertionError` if the Series differ.
This function is intended for use in unit tests.

.. versionchanged:: 0.20.31
    The `check_dtype` parameter was renamed `check_dtypes`.

.. versionchanged:: 1.32.3
    The `rtol` and `atol` parameters were renamed to `rel_tol` and `abs_tol`,
    respectively.

Parameters
----------
left
    The first Series to compare.
right
    The second Series to compare.
check_dtypes
    Requires data types to match.
check_names
    Requires names to match.
check_order
    Requires elements to appear in the same order.
check_exact
    Requires float values to match exactly. If set to `False`, values are considered
    equal when within tolerance of each other (see `rel_tol` and `abs_tol`).
    Only affects columns with a Float data type.
rel_tol
    Relative tolerance for inexact checking, given as a fraction of the values in
    `right`.
abs_tol
    Absolute tolerance for inexact checking.
categorical_as_str
    Cast categorical columns to string before comparing. Enabling this helps
    compare columns that do not share the same string cache.

See Also
--------
assert_frame_equal
assert_series_not_equal

Notes
-----
When using pytest, it may be worthwhile to shorten Python traceback printing
by passing `--tb=short`. The default mode tends to be unhelpfully verbose.
More information in the
`pytest docs <https://docs.pytest.org/en/latest/how-to/output.html#modifying-python-traceback-printing>`_.

Examples
--------
>>> from polars.testing import assert_series_equal
>>> s1 = pl.Series([1, 2, 3])
>>> s2 = pl.Series([1, 5, 3])
>>> assert_series_equal(s1, s2)
Traceback (most recent call last):
...
AssertionError: Series are different (exact value mismatch)
[left]: shape: (3,)
Series: '' [i64]
[
    1
    2
    3
]
[right]: shape: (3,)
Series: '' [i64]
[
    1
    5
    3
]
Tr   N)r   r   _s)
r   r   r   r   r   r   r   r   r   r   s
             r   assert_series_equalr"      s>    r t+!-
r   c               z    Sn	[        X5         [        U UUUUUUUUS9	  Sn
[        U
5      e! [         a     gf = f)a  
Assert that the left and right Series are **not** equal.

This function is intended for use in unit tests.

.. versionchanged:: 0.20.31
    The `check_dtype` parameter was renamed `check_dtypes`.

.. versionchanged:: 1.32.3
    The `rtol` and `atol` parameters were renamed to `rel_tol` and `abs_tol`,
    respectively.

Parameters
----------
left
    The first Series to compare.
right
    The second Series to compare.
check_dtypes
    Requires data types to match.
check_names
    Requires names to match.
check_order
    Requires elements to appear in the same order.
check_exact
    Requires float values to match exactly. If set to `False`, values are considered
    equal when within tolerance of each other (see `rel_tol` and `abs_tol`).
    Only affects columns with a Float data type.
rel_tol
    Relative tolerance for inexact checking, given as a fraction of the values in
    `right`.
abs_tol
    Absolute tolerance for inexact checking.
categorical_as_str
    Cast categorical columns to string before comparing. Enabling this helps
    compare columns that do not share the same string cache.

See Also
--------
assert_series_equal
assert_frame_not_equal

Examples
--------
>>> from polars.testing import assert_series_not_equal
>>> s1 = pl.Series([1, 2, 3])
>>> s2 = pl.Series([1, 2, 3])
>>> assert_series_not_equal(s1, s2)
Traceback (most recent call last):
...
AssertionError: Series are equal (but are expected not to be)
T)	r   r   r   r   r   r   r   r   r   z-Series are equal (but are expected not to be)N)r   r"   AssertionError)r   r   r   r   r   r   r   r   r   r   msgs              r   assert_series_not_equalr&      sa    F t+"%###1
	
 >S!!	  s   - 
::)r   r   r   r   returnbool)r   r   r   r   r   r(   r   r(   r   r(   r   r(   r   floatr   r)   r   r(   r'   None)
__future__r   
contextlibtypingr   polars._utils.deprecationr   polars.seriesr   polars.testing.asserts.utilsr   suppressImportErrorpolars._plrr   r   r"   r&    r   r   <module>r5      s   "   A   >%2 &
 ]NINVYAVYA
 $d
dd 	d
 d d d d d d 
d B B OdN ]NINVYAVYA
 $S"
S"S" 	S"
 S" S" S" S" S" S" 
S" B B OS"} &%s   C
C