[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of Polars.
Reproducible example
>>> pl.testing.assert_frame_equal(pl.Series([1]), pl.Series([1]))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "polars/testing/asserts/frame.py", line 90, in assert_frame_equal
lazy = _assert_correct_input_type(left, right)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "polars/testing/asserts/frame.py", line 144, in _assert_correct_input_type
raise_assertion_error(
File "polars/testing/asserts/utils.py", line 12, in raise_assertion_error
raise AssertionError(msg) from cause
AssertionError: inputs are different (unexpected input types)
[left]: Series
[right]: Series
>>> pl.testing.assert_series_equal(pl.DataFrame([1]), pl.DataFrame([1]))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "polars/testing/asserts/series.py", line 89, in assert_series_equal
raise_assertion_error(
File "polars/testing/asserts/utils.py", line 12, in raise_assertion_error
raise AssertionError(msg) from cause
AssertionError: inputs are different (unexpected input types)
[left]: DataFrame
[right]: DataFrame
Log output
No response
Issue description
The error message implies the inputs are different, even though they're the same - they're just both the wrong type.
Expected behavior
This should probably give a TypeError saying that the first input is not a DataFrame/not a Series.
Checks
Reproducible example
Log output
No response
Issue description
The error message implies the inputs are different, even though they're the same - they're just both the wrong type.
Expected behavior
This should probably give a TypeError saying that the first input is not a DataFrame/not a Series.
Installed versions