
    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
  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)cast)deprecate_renamed_parameter)	DataFrame)	LazyFrame)raise_assertion_error)assert_dataframe_equal_pyc                   Sn[        U [        5      (       a  [        U[        5      (       a  g[        U [        5      (       a  [        U[        5      (       a  g[        SS[	        U 5      R
                  [	        U5      R
                  5        g )NTFinputszunexpected input types)
isinstancer   r   r   type__name__)leftright__tracebackhide__s      V/home/james-whalen/.local/lib/python3.13/site-packages/polars/testing/asserts/frame.py_assert_correct_input_typer      sj     $	""z%'C'C	D)	$	$E9)E)E$JK  		
    check_dtypecheck_dtypesz0.20.31)versionrtolrel_tolz1.32.3atolabs_tolTFgh㈵>g:0yE>check_row_ordercheck_column_orderr   check_exactr   r   categorical_as_strc                   Sn	[        X5      n
U
(       a  U R                  5       UR                  5       p[        SU 5      [        SU5      p[        U R                  UR                  UUUUUUUS9	  g)a  
Assert that the left and right frame are equal.

Raises a detailed `AssertionError` if the frames 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 DataFrame or LazyFrame to compare.
right
    The second DataFrame or LazyFrame to compare.
check_row_order
    Requires row order to match.
check_column_order
    Requires column order to match.
check_dtypes
    Requires data types to match.
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. Fraction of 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

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_frame_equal
>>> df1 = pl.DataFrame({"a": [1, 2, 3]})
>>> df2 = pl.DataFrame({"a": [1, 5, 3]})
>>> assert_frame_equal(df1, df2)
Traceback (most recent call last):
...
AssertionError: DataFrames are different (value mismatch for column "a")
[left]: shape: (3,)
Series: 'a' [i64]
[
    1
    2
    3
]
[right]: shape: (3,)
Series: 'a' [i64]
[
    1
    5
    3
]
Tr   r   N)r   collectr   r	   _df)r   r   r   r   r   r   r   r   r    r   lazys              r   assert_frame_equalr%   !   so    p %d2D llnemmoe {D)4U+C%		'-!-
r   c                   Sn	[        X5      n
 [        U UUUUUUUUS9	  U
(       a  SOSnU S3n[        U5      e! [         a     gf = f)a  
Assert that the left and right frame 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 DataFrame or LazyFrame to compare.
right
    The second DataFrame or LazyFrame to compare.
check_row_order
    Requires row order to match.
check_column_order
    Requires column order to match.
check_dtypes
    Requires data types to match.
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. Fraction of 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

Examples
--------
>>> from polars.testing import assert_frame_not_equal
>>> df1 = pl.DataFrame({"a": [1, 2, 3]})
>>> df2 = pl.DataFrame({"a": [1, 2, 3]})
>>> assert_frame_not_equal(df1, df2)
Traceback (most recent call last):
...
AssertionError: DataFrames are equal (but are expected not to be)
T)	r   r   r   r   r   r   r   r   r    
LazyFrames
DataFramesz' are equal (but are expected not to be)N)r   r%   AssertionError)r   r   r   r   r   r   r   r   r    r   r$   objectsmsgs                r   assert_frame_not_equalr,      st    D %d2D"1+%#1
	
 #',L	@AS!!  s   ; 
AA)r   DataFrame | LazyFramer   r-   returnbool)r   r-   r   r-   r   r/   r   r/   r   r/   r   r/   r   floatr   r0   r    r/   r.   None)
__future__r   
contextlibtypingr   polars._utils.deprecationr   polars.dataframer   polars.lazyframer   polars.testing.asserts.utilsr   suppressImportErrorpolars._plrr	   r   r%   r,    r   r   <module>r=      s   "   A & & >%5 &


(=
	
$ ]NINVYAVYA
 !#$j
j j 	j
 j j j j j j 
j B B OjZ ]NINVYAVYA
 !#$S"
S" S" 	S"
 S" S" S" S" S" S" 
S" B B OS"S &%s   C
C*