diff --git a/Orange/canvas/tests/__init__.py b/Orange/canvas/tests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Orange/canvas/tests/test_mainwindow.py b/Orange/canvas/tests/test_mainwindow.py new file mode 100644 index 00000000000..b1f5f8fe17d --- /dev/null +++ b/Orange/canvas/tests/test_mainwindow.py @@ -0,0 +1,13 @@ +# pylint: disable=all +from unittest.mock import patch + +from Orange.canvas.mainwindow import MainWindow, OUserSettingsDialog +from Orange.widgets.tests.base import GuiTest + + +class TestMainWindow(GuiTest): + def test_settings_dialog(self): + mw = MainWindow() + with patch.object(OUserSettingsDialog, "exec", lambda self: 0), \ + patch.object(OUserSettingsDialog, "show", lambda self: None): + mw.open_canvas_settings() diff --git a/requirements-gui.txt b/requirements-gui.txt index a898fac9290..bfe7c8d15bd 100644 --- a/requirements-gui.txt +++ b/requirements-gui.txt @@ -1,4 +1,4 @@ -orange-canvas-core>=0.1.19,<0.2a +orange-canvas-core>=0.1.21,<0.2a orange-widget-base>=4.13.0 PyQt5>=5.12,!=5.15.1 # 5.15.1 skipped because of QTBUG-87057 - affects select columns diff --git a/tox.ini b/tox.ini index 358558529c4..ab2e9ec87ee 100644 --- a/tox.ini +++ b/tox.ini @@ -45,7 +45,8 @@ commands_pre = # freeze environment pip freeze commands = - coverage run {toxinidir}/quietunittest.py Orange.tests Orange.widgets.tests + coverage run {toxinidir}/quietunittest.py Orange.tests Orange.widgets.tests Orange.canvas.tests + coverage run {toxinidir}/quietunittest.py discover Orange.canvas.tests coverage combine coverage report