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

Add other open modes in group creation test #2840

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

asimchoudhary
Copy link

[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
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]>
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
2 participants