def test_init_failure_handling(mock_container, mock_log_fn):
    """Test that LogStreamer handles initialization failures gracefully."""
    mock_container.logs.side_effect = Exception('Test error')

    streamer = LogStreamer(mock_container, mock_log_fn)
    assert streamer.stdout_thread is None
    assert streamer.log_generator is None
    mock_log_fn.assert_called_with(
        'error', 'Failed to initialize log streaming: Test error'
    )
Test that LogStreamer handles initialization failures gracefully.
tests/unit/test_log_streamer.py