Skip to content

Commit

Permalink
ci: debug napari
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-yu committed Dec 17, 2024
1 parent 0fe23aa commit 567925b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/widgets/test_widget_open_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@


def test_widget_open_file(make_napari_viewer_proxy, path_h5):
print("test_widget_open_file called")
viewer = make_napari_viewer_proxy()
print("viewer created")
shape = (10, 10, 10)
data = np.random.rand(*shape).astype(np.float32)
voxel_size = VoxelSize(voxels_size=(0.235, 0.15, 0.15))
print("data created")
create_h5(path_h5, data, "raw", voxel_size=voxel_size)
create_h5(path_h5, data, "prob", voxel_size=voxel_size)

print("h5 created")
widget_open_file(
path_mode=PathMode.FILE.value,
path=path_h5,
Expand All @@ -23,7 +26,9 @@ def test_widget_open_file(make_napari_viewer_proxy, path_h5):
stack_layout="ZYX",
update_other_widgets=False,
)
print("widget_open_file called")
napari.run()
print("napari.run() called")

assert viewer.layers[0].name == "test_raw"
assert viewer.layers[0].data.shape == shape
Expand Down

0 comments on commit 567925b

Please sign in to comment.