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

use subprocess.check_output to call jzarr test script #1

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

grlee77
Copy link

@grlee77 grlee77 commented Apr 27, 2021

I verified that the following is actually running the script and will fail if an invalid ds_name is given.

For example, if I call it with (nonexistent) ds_name = 'raw2' I get (I replaced a long local path with <DATA_PATH> for brevity):

CalledProcessError: Command 'generate_data/jzarr/generate_data.sh -verify '<DATA_PATH>/jzarr_flat.zr' raw2' returned non-zero exit status 2.

@grlee77
Copy link
Author

grlee77 commented Apr 27, 2021

If you wanted it to print the stdout each time, I would modify slightly to:

    stdout = subprocess.check_output(cmd, shell=True, universal_newlines=True)
    print(stdout)

but pytest will suppress this output by default when running the tests. (calling pytest with -s in the command line arguments would show it, but this is dozens of lines each time, so it gets pretty cluttered).

@joshmoore joshmoore merged commit 301bc4d into joshmoore:jzarr Apr 28, 2021
joshmoore pushed a commit that referenced this pull request Aug 19, 2021
zarr 2.8 introduces the dimension_separator metadata key
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 this pull request may close these issues.

2 participants