Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestKikuchipyH5EBSD.test_load_with_padding test failure #661

Open
ericpre opened this issue Nov 5, 2023 · 1 comment
Open

TestKikuchipyH5EBSD.test_load_with_padding test failure #661

ericpre opened this issue Nov 5, 2023 · 1 comment
Labels
maintenance This relates to package maintenance

Comments

@ericpre
Copy link
Contributor

ericpre commented Nov 5, 2023

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
@hakonanes
Copy link
Member

Thanks for the report, @ericpre. I'll see to reducing the number of warnings soon.

@hakonanes hakonanes added the maintenance This relates to package maintenance label Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance This relates to package maintenance
Projects
None yet
Development

No branches or pull requests

2 participants