Skip to content

Commit 2a3c895

Browse files
committed
use temporary folder helper for example tests
1 parent f616715 commit 2a3c895

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

test/autoExampleTest/test_examples.m

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@
4141
[folders,names,exts] = cellfun(@fileparts,exampleScripts,'UniformOutput',false);
4242

4343
%Create temporary example test folder
44-
tmpExampleTestFolder = tempdir();
45-
tmpExampleTestFolder = fullfile(tmpExampleTestFolder,'exampleTest');
46-
if ~exist(tmpExampleTestFolder,'dir')
47-
mkdir(tmpExampleTestFolder);
48-
end
44+
tmpExampleTestFolder = helper_temporaryFolder('exampleTest',true);
4945
addpath(tmpExampleTestFolder);
5046
newFolders = cell(size(folders));
5147
[newFolders{:}] = deal(tmpExampleTestFolder);
@@ -80,12 +76,6 @@
8076
%test_functions{testIx,1} = testfun;
8177
end
8278

83-
try
84-
rmdir(exampleTestFolder,'s');
85-
catch
86-
warning('Could not delete temporary example test folder');
87-
end
88-
8979
%initTestSuite;
9080
%We need to manually set up the test_suite
9181

0 commit comments

Comments
 (0)