kreshuklab / plant-seg

A tool for cell instance aware segmentation in densely packed 3D volumetric images
https://kreshuklab.github.io/plant-seg/
MIT License
88 stars 31 forks source link

Some tests for Zarr are invalid #234

Closed qin-yu closed 3 months ago

qin-yu commented 3 months ago

The tests were designed to be inspected by human.

E.g. This test is wrong but still passes. There is no key volumes/raw2 anyway.

    def test_del_zarr_key(self, input_path_zarr, key="volumes/raw2"):
        import zarr
        from plantseg.io.zarr import del_zarr_key
        # sanity check
        f = zarr.open(input_path_zarr, 'r')

        print("## before deletion, checking hierarchy##")
        print(f.tree())

        # delete key
        del_zarr_key(input_path_zarr, key)

        print("## after deletion, checking hierarchy##")
        print(f.tree())

Test output:

tests/test_io_zarr.py::TestZarr::test_del_zarr_key 
## before deletion, checking hierarchy##
/
 └── volumes
     └── raw (32, 128, 128) float64
## after deletion, checking hierarchy##
/
 └── volumes
     └── raw (32, 128, 128) float64
PASSED