dask-image icon indicating copy to clipboard operation
dask-image copied to clipboard

`TestInvalidArguments.test_nan_blocksize` fails on aarch64

Open risicle opened this issue 3 years ago • 1 comments

Hi,

In preparing the NixOS packages for dask-image on aarch64-linux, we noticed that the following test has been failing since version 0.6.0 of dask-image:

_______ TestInvalidArguments.test_nan_blocksize[gaussian-nan-ValueError] _______

self = <test_ndfilters.test__threshold.TestInvalidArguments object at 0x55346e7d00>
method = 'gaussian', block_size = nan, error_type = <class 'ValueError'>

    @pytest.mark.parametrize("method, block_size, error_type", [
        ('median', np.nan, TypeError),
    ])
    def test_nan_blocksize(self, method, block_size, error_type):
        with pytest.raises(error_type):
>           threshold_local(self.image, block_size, method=method)
E           Failed: DID NOT RAISE <class 'ValueError'>

tests/test_dask_image/test_ndfilters/test__threshold.py:108: Failed

(above output from 2021.12.0)

The last known passing version we had for aarch64 was 0.4.0. We jumped from that to 0.6.0 so the issue is likely introduced somewhere in that period. This is using python 3.8 & 3.9.

A full build log is visible at https://hydra.nixos.org/build/161095697/log where you can also see the exact versions of all dependencies in use.

risicle avatar Dec 18 '21 14:12 risicle

Hm, interesting. I'm going to guess we changed some minimum versions of dependencies around that time, not sure if that might have something to do with it.

I can't help further, I'm about to take some time off over the new year.

GenevieveBuckley avatar Dec 21 '21 07:12 GenevieveBuckley

I've looked into this a bit more and I don't think this is a problem. The simplest solution is to remove that line from the pytest parameterize (for both the numpy and cupy test cases).

I wrote that test several years ago, and it looks like I just added that in for coverage reasons, not because we really want to see an error raised there.

GenevieveBuckley avatar Mar 14 '23 02:03 GenevieveBuckley