Skip to content

Commit

Permalink
Fix a potential race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
matrss committed Mar 21, 2024
1 parent 37856f8 commit c9625a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/_test_msui/test_mscolab.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,10 @@ def test_browse_add_operation(self, mockopen, qtbot):
self.window.mscolab.add_proj_dialog.buttonBox.Ok)
with mock.patch("PyQt5.QtWidgets.QMessageBox.information") as m:
QtTest.QTest.mouseClick(okWidget, QtCore.Qt.LeftButton)
m.assert_called_once()

def assert_():
m.assert_called_once()
qtbot.wait_until(assert_)

def assert_():
assert self.window.listOperationsMSC.model().rowCount() == 1
Expand Down

0 comments on commit c9625a9

Please sign in to comment.