kikuchipy icon indicating copy to clipboard operation
kikuchipy copied to clipboard

`TestKikuchipyH5EBSD.test_load_with_padding` test failure

Open ericpre opened this issue 7 months ago • 1 comments

https://github.com/ericpre/hyperspy-bundle/actions/runs/6760600920/job/18374570541


================================== FAILURES ===================================
____________ TestKikuchipyH5EBSD.test_load_with_padding[h5-False] _____________

self = <kikuchipy.io.plugins.tests.test_kikuchipy_h5ebsd.TestKikuchipyH5EBSD object at 0x0000023BB1C7D1D0>
save_path_hdf5 = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp_cu9p8ve\\patterns.h5'
lazy = False
ni_small_axes_manager = {'axis-0': {'_type': 'UniformDataAxis', 'is_binned': False, 'name': 'y', 'navigate': True, ...}, 'axis-1': {'_type': '...vigate': False, ...}, 'axis-3': {'_type': 'UniformDataAxis', 'is_binned': False, 'name': 'dx', 'navigate': False, ...}}

    @pytest.mark.parametrize("lazy", (True, False))
    def test_load_with_padding(self, save_path_hdf5, lazy, ni_small_axes_manager):
        s = load(KIKUCHIPY_FILE)
        s.save(save_path_hdf5)
    
        new_n_columns = 4
        with File(save_path_hdf5, mode="r+") as f:
            f["Scan 1/EBSD/Header/n_columns"][()] = new_n_columns
    
        with pytest.warns(UserWarning) as warninfo:
            s_reload = load(save_path_hdf5, lazy=lazy)
>       assert len(warninfo) == 2
E       assert 3 == 2
E        +  where 3 = len(WarningsChecker(record=True))

D:\a\hyperspy-bundle\hyperspy-bundle\WPy64-31150\python-3.11.5.amd64\Lib\site-packages\kikuchipy\io\plugins\tests\test_kikuchipy_h5ebsd.py:[139](https://github.com/ericpre/hyperspy-bundle/actions/runs/6760600920/job/18374570541#step:18:140): AssertionError

ericpre avatar Nov 05 '23 13:11 ericpre