Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add qwait so model data gets called during test
Browse files Browse the repository at this point in the history
jopohl committed Jun 20, 2018
1 parent e146078 commit f1250b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_options_gui.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from PyQt5.QtTest import QTest

from tests.QtTestCase import QtTestCase
from urh.controller.dialogs.OptionsDialog import OptionsDialog
from urh.dev.BackendHandler import BackendHandler
@@ -42,6 +44,8 @@ def test_plugins_tab(self):

def test_device_tab(self):
self.dialog.ui.tabWidget.setCurrentIndex(4)
# ensure device table model gets populated during tests
QTest.qWait(300)
self.assertEqual(self.dialog.ui.tabWidget.tabText(4), "Device")

self.assertEqual(self.dialog.ui.tblDevices.model().rowCount(), len(BackendHandler.DEVICE_NAMES))

0 comments on commit f1250b7

Please sign in to comment.