From 13677d3563dbd01ae188a2b1a79c7dd840a5dc5e Mon Sep 17 00:00:00 2001 From: pkill9 Date: Sat, 25 Mar 2017 21:16:51 +0000 Subject: [PATCH] Add mouse back button to click test. --- tests/unit/mainwindow/test_messageview.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/unit/mainwindow/test_messageview.py b/tests/unit/mainwindow/test_messageview.py index 0d576c391..15160f45c 100644 --- a/tests/unit/mainwindow/test_messageview.py +++ b/tests/unit/mainwindow/test_messageview.py @@ -132,3 +132,8 @@ def test_click_messages(qtbot, view): view.show_message(usertypes.MessageLevel.info, 'test mouse right click') QTest.mousePress(view, Qt.RightButton) assert not view._messages + + # Test mouse back button - This shouldn't clear messages. + view.show_message(usertypes.MessageLevel.info, 'test mouse back button') + QTest.mousePress(view, Qt.BackButton) + assert len(view._messages) == 1