Skip to content
Snippets Groups Projects
Commit 3d6e63fb authored by morkolai's avatar morkolai
Browse files

Cleanup test/test_dialog_wrappers.py

parent 750ff26b
No related branches found
No related tags found
1 merge request!52#82 Cleanup
......@@ -7,7 +7,6 @@ our code after the dialog started, even though it is modal.
"""
import unittest
from functools import partial
from PySide2 import QtGui
from PySide2.QtWidgets import QApplication, QMessageBox
from PySide2.QtCore import QTimer, Qt
......@@ -38,8 +37,8 @@ class TestDialogWrappers(unittest.TestCase):
"""Test the general QMessageBox wrapper."""
QTimer.singleShot(
0,
partial(
self.assert_that_dialog_has_icon_and_close, QMessageBox.NoIcon
lambda: self.assert_that_dialog_has_icon_and_close(
QMessageBox.NoIcon
),
)
exec_qmessagebox_dialog(
......@@ -50,9 +49,8 @@ class TestDialogWrappers(unittest.TestCase):
"""Test the critical message wrapper."""
QTimer.singleShot(
0,
partial(
self.assert_that_dialog_has_icon_and_close,
QMessageBox.Critical,
lambda: self.assert_that_dialog_has_icon_and_close(
QMessageBox.Critical
),
)
exec_critical_dialog("text", "informative text")
......@@ -61,9 +59,8 @@ class TestDialogWrappers(unittest.TestCase):
"""Test the info message wrapper."""
QTimer.singleShot(
0,
partial(
self.assert_that_dialog_has_icon_and_close,
QMessageBox.Information,
lambda: self.assert_that_dialog_has_icon_and_close(
QMessageBox.Information
),
)
exec_info_dialog("text", "informative text")
......@@ -72,8 +69,8 @@ class TestDialogWrappers(unittest.TestCase):
"""Test the warning message wrapper."""
QTimer.singleShot(
0,
partial(
self.assert_that_dialog_has_icon_and_close, QMessageBox.Warning
lambda: self.assert_that_dialog_has_icon_and_close(
QMessageBox.Warning
),
)
exec_warning_dialog("text", "informative text")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment