Skip to content

Commit e5889f0

Browse files
authored
Merge pull request #138 from mathworks/toobig-test-fix
Toobig test fix
2 parents 9b51872 + b6c8a20 commit e5889f0

4 files changed

Lines changed: 21 additions & 10 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ The codebase is a three-language stack. Data and type information flow across al
3131
There is no build step — it's interpreted MATLAB plus a Python module on the path.
3232

3333
**Run the full test suite** (from the `test/` directory, since tests resolve data paths relative to `pwd`):
34+
3435
```matlab
3536
cd test
3637
results = runtests('IncludeSubfolders', true)
3738
```
3839

3940
**Run a single test class or method:**
41+
4042
```matlab
4143
cd test
4244
runtests('tZarrRead') % one class

SECURITY.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Reporting Security Vulnerabilities
1+
# Reporting Security Vulnerabilities
22

3-
If you believe you have discovered a security vulnerability, please report it to
4-
[security@mathworks.com](mailto:security@mathworks.com). Please see
5-
[MathWorks Vulnerability Disclosure Policy for Security Researchers](https://www.mathworks.com/company/aboutus/policies_statements/vulnerability-disclosure-policy.html)
6-
for additional information.
3+
If you believe you have discovered a security vulnerability, please report it to
4+
[security@mathworks.com](mailto:security@mathworks.com).
5+
6+
Please see: [MathWorks Vulnerability Disclosure Policy for Security Researchers](https://www.mathworks.com/company/aboutus/policies_statements/vulnerability-disclosure-policy.html) for additional information.

ZarrDatatype.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%ZARRDATATYPE Datatype of Zarr data
33
% Represents the datatype mapping between MATLAB, Tensorstore, and Zarr
44

5-
% Copyright 2025 The MathWorks, Inc.
5+
% Copyright 2025-2026 The MathWorks, Inc.
66

77
properties(Constant, Hidden)
88
% Same-length arrays that represent mapping between
@@ -28,8 +28,7 @@
2828
MATLABType
2929
end
3030

31-
methods (Hidden)
32-
% "Private" constructor - should not be used directly.
31+
methods (Access = private)
3332
% Use from*Type() static methods instead.
3433
function obj = ZarrDatatype(ind)
3534
obj.Index = ind;

test/tZarrRead.m

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
classdef tZarrRead < SharedZarrTestSetup
22
% Tests for zarrread function to read data from Zarr files in MATLAB.
33

4-
% Copyright 2025 The MathWorks, Inc.
4+
% Copyright 2025-2026 The MathWorks, Inc.
55

66
properties(Constant)
77
% Paths for read functions. SharedZarrTestSetup copies the contents
@@ -119,7 +119,17 @@ function nonExistentArray(testcase)
119119
function tooBigArray(testcase)
120120
% Verify zarrread error when a user tries to read data that is
121121
% too large
122-
122+
123+
% Lower the array size limit so the ~37 GiB array below always
124+
% exceeds it, regardless of how much RAM this machine has.
125+
s = settings;
126+
limitEnabled = s.matlab.desktop.workspace.ArraySizeLimitEnabled;
127+
limitPercent = s.matlab.desktop.workspace.ArraySizeLimit;
128+
testcase.addTeardown(@() clearTemporaryValue(limitEnabled));
129+
testcase.addTeardown(@() clearTemporaryValue(limitPercent));
130+
limitEnabled.TemporaryValue = true;
131+
limitPercent.TemporaryValue = 1;
132+
123133
bigDataPath = "bigData/myzarr";
124134
zarrcreate(bigDataPath, [100000,100000], Datatype='single');
125135
errID = 'MATLAB:Zarr:OutOfMemory';

0 commit comments

Comments
 (0)