def test_file_edit_observation_no_changes():
    """Test behavior when content hasn't changed."""
    content = 'Hello\nWorld\n'
    obs = FileEditObservation(
        path='/test/file.txt',
        prev_exist=True,
        old_content=content,
        new_content=content,
        impl_source=FileEditSource.LLM_BASED_EDIT,
        content=content,  # Initial content is old_content
    )

    diff = obs.visualize_diff()
    assert '(no changes detected' in diff
Test behavior when content hasn't changed.
tests/unit/test_file_edit_observation.py