Skip to content

Enable tests for datatype mismatch #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions test/tZarrWrite.m
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,14 @@ function invalidFilePath(testcase)
testcase.verifyError(@()zarrwrite('',data),errID);
end

% function dataDatatypeMismatch(testcase)
% % Verify error for mismatch between datatype value and datatype
% % of data to be written with zarrwrite.
%
% %TOCHECK: Failure on Linux
% zarrcreate(testcase.ArrPathWrite,testcase.ArrSize,"Datatype",'int8');
% data = ones(testcase.ArrSize);
% testcase.verifyError(@()zarrwrite(testcase.ArrPathWrite,data),testcase.PyException);
% end
function dataDatatypeMismatch(testcase)
% Verify error for mismatch between datatype value and datatype
% of data to be written with zarrwrite.
errID = 'MATLAB:Python:PyExceptionWithNDArrayInfoAndMsg';
zarrcreate(testcase.ArrPathWrite,testcase.ArrSize,"Datatype",'int8');
data = ones(testcase.ArrSize);
testcase.verifyError(@()zarrwrite(testcase.ArrPathWrite,data),errID);
end

function dataDimensionMismatch(testcase)
% Verify error when there is a dimension mismatch at the time of
Expand Down