File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -75,9 +75,15 @@ def test_multiple_times_save_filename(qtbot, tmp_path):
7575 assert os .path .exists (filename ) is False
7676 # verify that we can save the file multiple times
7777 msui .save_flight_track (filename )
78- assert os .path .exists (filename )
78+ def assert_wait_until_saved ():
79+ assert os .path .exists (filename )
80+ qtbot .wait_until (assert_wait_until_saved )
7981 first_timestamp = os .path .getmtime (filename )
82+ # file update
8083 msui .save_handler ()
84+ def assert_wait_until_updated ():
85+ assert os .path .exists (filename ) and os .path .getmtime (filename ) > first_timestamp
86+ qtbot .wait_until (assert_wait_until_updated )
8187 second_timestamp = os .path .getmtime (filename )
8288 with mock .patch ("PyQt5.QtWidgets.QMessageBox.warning" , return_value = QtWidgets .QMessageBox .Yes ):
8389 msui .close ()
You can’t perform that action at this time.
0 commit comments