Skip to content

Commit 795bfb9

Browse files
committed
use qtbot to manage QLutView
1 parent aa27b69 commit 795bfb9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/views/qt/test_lut_view.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
from __future__ import annotations
22

3+
from typing import TYPE_CHECKING
4+
35
import cmap
46
from pytest import fixture
57

68
from ndv.models._lut_model import ClimsManual, ClimsMinMax, LUTModel
79
from ndv.views._app import QtProvider
810
from ndv.views._qt._array_view import QLutView
911

12+
if TYPE_CHECKING:
13+
from pytestqt.qtbot import QtBot
14+
1015

1116
@fixture(autouse=True)
1217
def init_provider() -> None:
@@ -20,8 +25,9 @@ def model() -> LUTModel:
2025

2126

2227
@fixture
23-
def view(model: LUTModel) -> QLutView:
28+
def view(model: LUTModel, qtbot: QtBot) -> QLutView:
2429
view = QLutView()
30+
qtbot.add_widget(view.frontend_widget())
2531
# Set the model
2632
assert view.model is None
2733
view.model = model

0 commit comments

Comments
 (0)