Skip to content

Commit cea8bb0

Browse files
committed
WIP
1 parent c306535 commit cea8bb0

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/test_interpreter.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -911,9 +911,18 @@ TEST_SUITE("xassist"){
911911

912912
StreamRedirectRAII redirect(std::cerr);
913913

914-
assist(line, cell);
914+
try
915+
{
916+
assist(line, cell);
917+
918+
REQUIRE(redirect.getCaptured() == "Failed to open file for reading API key for model openai\nAPI key for model openai is not available.\n");
919+
920+
}
921+
catch (const std::runtime_error& e)
922+
{
923+
REQUIRE(true);
924+
}
915925

916-
REQUIRE(redirect.getCaptured() == "Failed to open file for reading API key for model openai\nAPI key for model openai is not available.\n");
917926
}
918927

919928
TEST_CASE("gemini"){

0 commit comments

Comments
 (0)