Make singleShot wait times 0 ms to speed up the tests

This commit is contained in:
Micah Lee 2019-11-08 17:27:17 +08:00
parent 6ae9c7b19e
commit c185b001fc
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -75,7 +75,7 @@ class TestTabs(GuiBaseTest):
)
# Prepare to reject the dialog
QtCore.QTimer.singleShot(200, tab.close_dialog.reject_button.click)
QtCore.QTimer.singleShot(0, tab.close_dialog.reject_button.click)
# Close tab
self.gui.tabs.tabBar().tabButton(0, QtWidgets.QTabBar.RightSide).click()
@ -85,7 +85,7 @@ class TestTabs(GuiBaseTest):
self.assertTrue(tab.get_mode().isVisible())
# Prepare to accept the dialog
QtCore.QTimer.singleShot(200, tab.close_dialog.accept_button.click)
QtCore.QTimer.singleShot(0, tab.close_dialog.accept_button.click)
# Close tab
self.gui.tabs.tabBar().tabButton(0, QtWidgets.QTabBar.RightSide).click()
@ -105,7 +105,7 @@ class TestTabs(GuiBaseTest):
self.assertTrue(os.path.exists(tab.settings.filename))
# Prepare to reject the dialog
QtCore.QTimer.singleShot(200, tab.close_dialog.reject_button.click)
QtCore.QTimer.singleShot(0, tab.close_dialog.reject_button.click)
# Close tab
self.gui.tabs.tabBar().tabButton(0, QtWidgets.QTabBar.RightSide).click()
@ -118,7 +118,7 @@ class TestTabs(GuiBaseTest):
self.assertTrue(os.path.exists(tab.settings.filename))
# Prepare to accept the dialog
QtCore.QTimer.singleShot(200, tab.close_dialog.accept_button.click)
QtCore.QTimer.singleShot(0, tab.close_dialog.accept_button.click)
# Close tab
self.gui.tabs.tabBar().tabButton(0, QtWidgets.QTabBar.RightSide).click()
@ -263,7 +263,7 @@ class TestTabs(GuiBaseTest):
)
# Prepare to reject the dialog
QtCore.QTimer.singleShot(200, self.gui.close_dialog.reject_button.click)
QtCore.QTimer.singleShot(0, self.gui.close_dialog.reject_button.click)
# Close the window
self.gui.close()