Skip to content

Commit 88563e7

Browse files
committed
Make sure the module is already on the path in the reload method
1 parent d9bbc99 commit 88563e7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Zarr.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ function pyReloadInProcess()
4747
% this call. For Out-of-Process Python, can just use
4848
% `terminate(pyenv)` instead.
4949

50-
py.importlib.reload(Zarr.ZarrPy);
50+
% make sure the python module is on the path
51+
Zarr.pySetup()
52+
53+
% reload
54+
py.importlib.reload(Zarr.ZarrPy);
5155
end
5256

5357
function isZarray = isZarrArray(path)

test/tZarr.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function verifySupportedCloudPatterns(testcase)
2929
function verifyReload(testcase)
3030
% Verify that calling reload method does not cause any issues
3131

32-
Zarr.pyReloadInProcess();
32+
Zarr.pyReloadInProcess()
3333
zarrPyModule = Zarr.ZarrPy;
3434
testcase.verifyTrue(isa(zarrPyModule, 'py.module'))
3535

0 commit comments

Comments
 (0)