Skip to content

Commit e6e9716

Browse files
committed
Update create group tests
1 parent 36a142a commit e6e9716

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

test/tZarr.m

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,15 @@ function verifyInvalidTensorstoreType(testcase)
8181
end
8282

8383
function verifyCreateGroupMakesFolder(testcase)
84-
% Verify that createGroup creates the directory when it does not
85-
% already exist, and writes a valid .zgroup file into it.
86-
groupPath = fullfile(pwd, "brandNewGroup");
87-
testcase.verifyFalse(isfolder(groupPath),...
88-
"Group folder should not exist before createGroup.");
84+
% Verify that createGroup creates the directory and writes a
85+
% .zgroup file into it
86+
import matlab.unittest.fixtures.TemporaryFolderFixture
87+
tempFixture = testcase.applyFixture(TemporaryFolderFixture);
88+
groupPath = fullfile(tempFixture.Folder, "brandNewGroup");
8989

9090
Zarr.createGroup(groupPath);
91-
92-
testcase.verifyTrue(isfolder(groupPath),...
93-
"createGroup should have created the folder.");
9491
testcase.verifyTrue(isfile(fullfile(groupPath, ".zgroup")),...
9592
"createGroup should have written a .zgroup file.");
96-
testcase.verifyEqual(zarrinfo(groupPath).node_type, 'group',...
97-
"createGroup should produce a valid Zarr group.");
9893
end
9994

10095
function verifyCreateGroupOpenFailure(testcase)

0 commit comments

Comments
 (0)