Skip to content

Created tests/conftest.py with mocks for all missing dependencies to allow pytest to run tests. #1242

@karthik642006

Description

@karthik642006

🧪 [testing improvement] Add test for SafeStore KeyError exception path

The SafeStore.__getitem__ method (formerly ZarrNotFilledStore) was missing a test for the KeyError exception path where it should raise a FileNotFoundError. This is important for ensuring that zarr propagates the exception rather than filling.

This PR adds:

  • tests/test_util_safestore.py: A new unit test file for the SafeStore class.

Coverage:

  • Happy path for __getitem__.
  • KeyError path for __getitem__ (raising FileNotFoundError).
  • __len__, __iter__, __getattr__ (passthrough and __setstate__ restriction).
  • __setitem__ and __delitem__ (raising NotImplementedError).

The improvement ensures better reliability and coverage for this critical data-access utility

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions