-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test docking the plugin widget (#346)
* simple test to dock the plugin widget to a viewer Signed-off-by: Ziwen Liu <[email protected]> * remove python 3.11 support and tests this should be reverted once napari releases with 3.11 support * update gui dependency action * remove more 3.11 reference * update actions according to cookiecutter * delete the widget see napari/napari#3948 * test if the napari viewer fixture works will revert later * Revert "test if the napari viewer fixture works" This reverts commit ccc8dad. * use pytest-xvfb * Revert "delete the widget" This reverts commit 3594e42. * do not import napari * Revert "use pytest-xvfb" This reverts commit a1ce656. * skip test for linux CI runners * specify skip reason * comment fixme * explicit boolean condition --------- Signed-off-by: Ziwen Liu <[email protected]>
- Loading branch information
Showing
8 changed files
with
27 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# TODO: remove in Python 3.11 | ||
from __future__ import annotations | ||
|
||
from qtpy.QtCore import Signal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# TODO: remove in Python 3.11 | ||
from __future__ import annotations | ||
|
||
from qtpy.QtCore import Signal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import sys | ||
import os | ||
|
||
import pytest | ||
from napari.viewer import ViewerModel | ||
|
||
from recOrder.plugin.main_widget import MainWidget | ||
|
||
|
||
# FIXME: Linux Qt platform in GitHub actions | ||
@pytest.mark.skipif( | ||
bool("linux" in sys.platform and os.environ.get("CI")), | ||
reason="Qt on Linux CI runners does not work", | ||
) | ||
def test_dock_widget(make_napari_viewer): | ||
viewer: ViewerModel = make_napari_viewer() | ||
viewer.window.add_dock_widget(MainWidget(viewer)) | ||
assert "recOrder" in list(viewer._window._dock_widgets.keys())[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters