Skip to content

Hyptohesis test failure #2155

@dstansby

Description

@dstansby

Zarr version

3

Numcodecs version

n/a

Python Version

3.12

Operating System

macOS

Installation

pip

Description

=================================== FAILURES ===================================
________________________________ test_roundtrip ________________________________

    @given(st.data())
>   def test_roundtrip(data):

tests/v3/test_properties.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/v3/test_properties.py:16: in test_roundtrip
    zarray = data.draw(arrays(arrays=st.just(nparray)))
../../../.local/share/hatch/env/virtual/zarr/nOVTQ5-s/test.py3.11-1.26-optional/lib/python3.11/site-packages/hypothesis/strategies/_internal/core.py:2162: in draw
    result = self.conjecture_data.draw(strategy, observe_as=f"generate:{desc}")
../../../.local/share/hatch/env/virtual/zarr/nOVTQ5-s/test.py3.11-1.26-optional/lib/python3.11/site-packages/hypothesis/internal/conjecture/data.py:2525: in draw
    return strategy.do_draw(self)
../../../.local/share/hatch/env/virtual/zarr/nOVTQ5-s/test.py3.11-1.26-optional/lib/python3.11/site-packages/hypothesis/strategies/_internal/lazy.py:167: in do_draw
    return data.draw(self.wrapped_strategy)
../../../.local/share/hatch/env/virtual/zarr/nOVTQ5-s/test.py3.11-1.26-optional/lib/python3.11/site-packages/hypothesis/internal/conjecture/data.py:2519: in draw
    return strategy.do_draw(self)
../../../.local/share/hatch/env/virtual/zarr/nOVTQ5-s/test.py3.11-1.26-optional/lib/python3.11/site-packages/hypothesis/strategies/_internal/core.py:1785: in do_draw
    return self.definition(data.draw, *self.args, **self.kwargs)
src/zarr/testing/strategies.py:133: in arrays
    a[:] = nparray
src/zarr/core/array.py:1021: in __setitem__
    self.set_orthogonal_selection(pure_selection, value, fields=fields)
src/zarr/core/array.py:1473: in set_orthogonal_selection
    return sync(
src/zarr/core/sync.py:91: in sync
    raise return_result
src/zarr/core/sync.py:50: in _runner
    return await coro
src/zarr/core/array.py:554: in _set_selection
    await self.codec_pipeline.write(
src/zarr/codecs/pipeline.py:460: in write
    await concurrent_map(
src/zarr/core/common.py:52: in concurrent_map
    return await asyncio.gather(*[func(*item) for item in items])
src/zarr/codecs/pipeline.py:386: in write_batch
    chunk_array_batch = [
src/zarr/codecs/pipeline.py:388: in <listcomp>
    if chunk_array is None or chunk_array.all_equal(chunk_spec.fill_value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <NDBuffer shape=(1,) dtype=complex128 array([0.+nanj])>, other = 0j

    def all_equal(self, other: Any) -> bool:
>       return bool((self._data == other).all())
E       RuntimeWarning: invalid value encountered in equal
E       while generating 'Draw 2: ' from arrays(arrays=just(array([0.+nanj])))
E       Falsifying example: test_roundtrip(
E           data=data(...),
E       )
E       Draw 1: array([0.+nanj])
E       Explanation:
E           These lines were always and only run by failing examples:
E               /home/runner/.local/share/hatch/env/virtual/zarr/nOVTQ5-s/test.py3.11-1.26-optional/lib/python3.11/site-packages/numpy/core/_ufunc_config.py:427
E               /home/runner/.local/share/hatch/env/virtual/zarr/nOVTQ5-s/test.py3.11-1.26-optional/lib/python3.11/site-packages/numpy/core/_ufunc_config.py:436
E               /home/runner/.local/share/hatch/env/virtual/zarr/nOVTQ5-s/test.py3.11-1.26-optional/lib/python3.11/site-packages/numpy/core/arrayprint.py:1013
E               /home/runner/.local/share/hatch/env/virtual/zarr/nOVTQ5-s/test.py3.11-1.26-optional/lib/python3.11/site-packages/numpy/core/arrayprint.py:1491
E               /home/runner/work/zarr-python/zarr-python/src/zarr/core/sync.py:91
E       
E       You can reproduce this example by temporarily adding @reproduce_failure('6.112.0', b'AXicY2FgZGRAB/8/ftjX/9/WCyIHAEENBbw=') as a decorator on your test case

src/zarr/core/buffer/core.py:460: RuntimeWarning

Steps to reproduce

Add @reproduce_failure('6.112.0', b'AXicY2FgZGRAB/8/ftjX/9/WCyIHAEENBbw=') to test_roundtrip() in tests/v3/test_properties.py

Additional output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPotential issues with the zarr-python library

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions