{"record":{"id":"b9d252d95b8b02ab","repo":"pola-rs/polars","slug":"objects-are-equal-but-are-expected-not-to-be","errorCode":null,"errorMessage":"{objects} are equal (but are expected not to be)","messagePattern":"(.+?) are equal \\(but are expected not to be\\)","errorType":"exception","errorClass":"AssertionError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/testing/asserts/frame.py","lineNumber":240,"sourceCode":"    lazy = _assert_correct_input_type(left, right)\n    try:\n        assert_frame_equal(\n            left=left,\n            right=right,\n            check_column_order=check_column_order,\n            check_row_order=check_row_order,\n            check_dtypes=check_dtypes,\n            check_exact=check_exact,\n            rel_tol=rel_tol,\n            abs_tol=abs_tol,\n            categorical_as_str=categorical_as_str,\n        )\n    except AssertionError:\n        return\n    else:\n        objects = \"LazyFrames\" if lazy else \"DataFrames\"\n        msg = f\"{objects} are equal (but are expected not to be)\"\n        raise AssertionError(msg)\n","sourceCodeStart":222,"sourceCodeEnd":241,"githubUrl":"https://github.com/pola-rs/polars/blob/5d8ebabf11caea54a5c29178a64a058762f49766/py-polars/src/polars/testing/asserts/frame.py#L222-L241","documentation":"assert_frame_not_equal calls assert_frame_equal and expects an AssertionError; when none is raised the else branch constructs this message (choosing 'LazyFrames' or 'DataFrames' based on input type) and raises. It is a sentinel failure of the negative assertion: the two frames are actually identical under the given tolerance/check options.","triggerScenarios":"Thrown at py-polars/src/polars/testing/asserts/frame.py:231 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use `assert_frame_equal` if you expect equality; if you expect difference, change the inputs so the frames actually differ."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5d8ebabf11caea54a5c29178a64a058762f49766","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}