async def test_file_content_formatting(self, tool, temp_repo, mock_redis):
        """Test that file content is properly formatted without duplication"""
        temp_dir, config_path = temp_repo

        # Test the centralized file preparation method directly
        file_content = tool._prepare_file_content_for_prompt(
            [config_path], None, "Test files", max_tokens=100000, reserve_tokens=1000  # No continuation
        )

        # Should contain file markers
        assert "--- BEGIN FILE:" in file_content
        assert "--- END FILE:" in file_content
        assert "config.py" in file_content

        # Should contain actual file content
        assert "MAX_CONTENT_TOKENS = 800_000" in file_content
        assert '__version__ = "1.0.0"' in file_content

        # Content should appear only once
        assert file_content.count("MAX_CONTENT_TOKENS = 800_000") == 1
        assert file_content.count('__version__ = "1.0.0"') == 1
Test that file content is properly formatted without duplication
tests/test_precommit_with_mock_store.py