Skip to content
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

Errors in IO plugin tests using dask.keys() #509

Closed
hakonanes opened this issue Feb 16, 2022 · 1 comment · Fixed by #515
Closed

Errors in IO plugin tests using dask.keys() #509

hakonanes opened this issue Feb 16, 2022 · 1 comment · Fixed by #515
Milestone

Comments

@hakonanes
Copy link
Member

Two tests of the NORDIF and h5ebsd IO plugins looking through dask.array.dask.keys() strings fail on HyperSpy's extension integration tests:

def test_load_readonly(self):
s = load(PATTERN_FILE, lazy=True)
k = next(
filter(
lambda x: isinstance(x, str) and x.startswith("array-original"),
s.data.dask.keys(),
)
)
mm = s.data.dask[k]
assert isinstance(mm, np.memmap)
assert not mm.flags["WRITEABLE"]

def test_load_readonly(self):
s = load(KIKUCHIPY_FILE, lazy=True)
k = next(
filter(
lambda x: isinstance(x, str) and x.startswith("array-original"),
s.data.dask.keys(),
)
)
mm = s.data.dask[k]
assert isinstance(mm, Dataset)

@hakonanes hakonanes added this to the v0.6.0 milestone Feb 16, 2022
@hakonanes
Copy link
Member Author

Key is original-array in latest dask versions, so we should just check for both as is done in hyperspy/hyperspy#2888.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant