import pytest from genesis.inference.exceptions import ( LLMError, LLMNetworkError, LLMNotConfiguredError, LLMResponseError, LLMTimeoutError, ) def test_error_hierarchy(): assert issubclass(LLMNetworkError, LLMError) assert issubclass(LLMTimeoutError, LLMError) assert issubclass(LLMNotConfiguredError, LLMError) assert issubclass(LLMResponseError, LLMError) def test_error_message_roundtrip(): e = LLMTimeoutError("timeout!") assert str(e) == "timeout!"