Skip to content

Surprising N5FSStore test failure #11

@joshmoore

Description

@joshmoore

Using the Python 3.9 / Debian sid Dockerfile in zarr-developers/zarr-python#858 and checking out the master branch, zarr/tests/test_core.py::TestArrayWithN5FSStore::test_nchunks_initialized fails as below. This is not the case for the Python 3.9 build in GHA.

cc: @d-v-b

zarr/tests/test_core.py:1811:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zarr/core.py:1280: in __setitem__
    self.set_basic_selection(pure_selection, value, fields=fields)
zarr/core.py:1375: in set_basic_selection
    return self._set_basic_selection_nd(selection, value, fields=fields)
zarr/core.py:1675: in _set_basic_selection_nd
    self._set_selection(indexer, value, fields=fields)
zarr/core.py:1747: in _set_selection
    self._chunk_setitems(lchunk_coords, lchunk_selection, chunk_values,
zarr/core.py:1941: in _chunk_setitems
    self._chunk_delitems(empty_chunks.keys())
zarr/core.py:1950: in _chunk_delitems
    self.store.delitems(ckeys)
zarr/storage.py:1211: in delitems
    self.map.delitems(nkeys)
/usr/lib/python3/dist-packages/fsspec/mapping.py:114: in delitems
    self.fs.rm([self._key_to_str(k) for k in keys])
/usr/lib/python3/dist-packages/fsspec/implementations/local.py:105: in rm
    path = self._strip_protocol(path).rstrip("/")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'fsspec.implementations.local.LocalFileSystem'>, path = ['/tmp/tmpwvl8yc5e/1', '/tmp/tmpwvl8yc5e/2', '/tmp/tmpwvl8yc5e/3', '/tmp/tmpwvl8yc5e/4', '/tmp/tmpwvl8yc5e/5', '/tmp/tmpwvl8yc5e/6', ...]

    @classmethod
    def _strip_protocol(cls, path):
        path = stringify_path(path)
>       if path.startswith("file://"):
E       AttributeError: 'list' object has no attribute 'startswith'

/usr/lib/python3/dist-packages/fsspec/implementations/local.py:145: AttributeError
================================================================================================================= warnings summary =================================================================================================================
zarr/tests/test_creation.py: 1 warning
zarr/tests/test_storage.py: 14 warnings
  /tmp/zarr-python/zarr/n5.py:706: RuntimeWarning: Not all N5 implementations support blosc compression (yet). You might not be able to open the dataset with another N5 library.
    warnings.warn(

zarr/tests/test_indexing.py::test_slice_selection_uints
  /tmp/zarr-python/zarr/tests/test_indexing.py:1444: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
    assert arr[slice_sel].shape == (1, 6)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=============================================================================================================== slowest 10 durations ===============================================================================================================
11.99s call     zarr/tests/test_indexing.py::test_set_orthogonal_selection_3d
3.83s call     zarr/tests/test_core.py::TestArrayWithFSStorePartialRead::test_non_cont
1.97s call     zarr/tests/test_indexing.py::test_set_orthogonal_selection_2d
1.32s call     zarr/tests/test_core.py::TestArrayWithFSStorePartialRead::test_array_2d
0.89s call     zarr/tests/test_storage.py::test_format_compatibility
0.85s call     zarr/tests/test_indexing.py::test_get_orthogonal_selection_3d
0.81s call     zarr/tests/test_core.py::TestArrayWithSQLiteStore::test_iter
0.78s call     zarr/tests/test_core.py::TestArrayWithFSStoreNestedPartialRead::test_array_2d
0.76s call     zarr/tests/test_core.py::TestArrayWithSQLiteStore::test_islice
0.73s call     zarr/tests/test_core.py::TestArrayWithFSStoreNestedPartialRead::test_non_cont
============================================================================================================= short test summary info ==============================================================================================================
FAILED zarr/tests/test_core.py::TestArrayWithN5FSStore::test_nchunks_initialized - AttributeError: 'list' object has no attribute 'startswith'
================================================================================== 1 failed, 2176 passed, 453 skipped, 8 xfailed, 16 warnings in 82.69s (0:01:22) ==================================================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions