Skip to content

Add other open modes in group creation test #2840

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 5 commits into from
Mar 4, 2025

Conversation

asimchoudhary
Copy link
Contributor

[Description of PR]
fixes: #2630

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.rst
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@github-actions github-actions bot added the needs release notes Automatically applied to PRs which haven't added release notes label Feb 16, 2025
Signed-off-by: asim <[email protected]>
@@ -1086,10 +1086,16 @@ async def test_open_falls_back_to_open_group_async() -> None:
assert group.attrs == {"key": "value"}


def test_open_mode_write_creates_group(tmp_path: pathlib.Path) -> None:
@pytest.mark.parametrize("mode", ["r", "r+", "w", "a"])
def test_open_modes_creates_group(tmp_path: pathlib.Path, mode: str) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should test this for every store class, but I think that can be a future PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed! looking forward to work on it and raise a PR

Add  else block for write operations only

Co-authored-by: Davis Bennett <[email protected]>
Copy link
Contributor

@dstansby dstansby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@dstansby dstansby enabled auto-merge (squash) February 28, 2025 09:27
@dstansby dstansby merged commit e9d31c4 into zarr-developers:main Mar 4, 2025
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs release notes Automatically applied to PRs which haven't added release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test for group creation across all mode options
3 participants