Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
soitool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bachelor-paa-bittet
soitool
Commits
3d6e63fb
Commit
3d6e63fb
authored
4 years ago
by
morkolai
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup test/test_dialog_wrappers.py
parent
750ff26b
No related branches found
Branches containing commit
No related tags found
1 merge request
!52
#82 Cleanup
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_dialog_wrappers.py
+8
-11
8 additions, 11 deletions
test/test_dialog_wrappers.py
with
8 additions
and
11 deletions
test/test_dialog_wrappers.py
+
8
−
11
View file @
3d6e63fb
...
...
@@ -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
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment