File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -101,12 +101,10 @@ async def test_long_term_memory_without_embedding_api_key(
101101 "Mocked VeFaaS IAM file not found"
102102 )
103103
104- # In this case, no exception should be raised during initialization,
105- # as the key is only required when the embedding model is actually used.
106- try :
107- LongTermMemory ()
108- except (ValueError , FileNotFoundError ) as e :
109- pytest .fail (f"Initialization failed unexpectedly: { e } " )
104+ # In this case, we expect an exception to be raised during initialization
105+ # because the embedding model requires an API key
106+ with pytest .raises ((ValueError , FileNotFoundError )):
107+ LongTermMemory (backend = "local" )
110108
111109 @pytest .mark .asyncio
112110 async def test_long_term_memory_backend_initialization (self ):
You can’t perform that action at this time.
0 commit comments