Skip to content

Commit 996bca1

Browse files
committed
Update texampleTests
1 parent 5341eb4 commit 996bca1

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed
Binary file not shown.

tests/texampleTests.m

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55

66
methods (TestClassSetup)
77
function saveEnvVar(testCase)
8-
% Ensures key is not in environment variable for tests
98
openAIEnvVar = "OPENAI_KEY";
109
key = getenv(openAIEnvVar);
11-
unsetenv(openAIEnvVar);
12-
testCase.addTeardown(@(x) setenv(openAIEnvVar, x), key);
10+
writelines("OPENAI_API_KEY="+key,".env");
11+
12+
testCase.addTeardown(@() delete(".env"));
13+
testCase.addTeardown(@() unsetenv("OPENAI_API_KEY"));
1314
end
1415
end
1516

1617
methods(Test)
17-
% Test methods
18-
1918
function testAnalyzeScientificPapersUsingFunctionCalls(~)
2019
AnalyzeScientificPapersUsingFunctionCalls;
2120
end

0 commit comments

Comments
 (0)