You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
===================================FAILURES===================================_______________________________test_tags_dialog_______________________________window=<tribler_gui.tribler_window.TriblerWindowobjectat0x12f312790>deftest_tags_dialog(window):
""" Test the behaviour of the dialog where a user can edit tags. """QTest.mouseClick(window.left_menu_button_popular, Qt.LeftButton)
widget=window.popular_pagewait_for_list_populated(widget.content_table)
# Test the tag modification dialogidx=widget.content_table.model().index(0, 0)
widget.content_table.on_edit_tags_clicked(idx)
screenshot(window, name="edit_tags_dialog")
assertwidget.content_table.add_tags_dialogwait_for_signal(widget.content_table.add_tags_dialog.suggestions_loaded)
# Edit the first tagtags_input=widget.content_table.add_tags_dialog.dialog_widget.edit_tags_inputnum_tags=len(tags_input.tags) -1# To account for the 'dummy' tag at the end of the input field.QTest.mouseClick(tags_input, Qt.LeftButton, pos=tags_input.tags[0].rect.center().toPoint())
QTest.keyClick(tags_input, Qt.Key_Home)
asserttags_input.editing_index==0asserttags_input.cursor_ind==0screenshot(window, name="edit_tags_dialog_edit_first_tag")
# Test selecting a single characterQTest.keyClick(tags_input, Qt.Key_Right)
QTest.keySequence(tags_input, QKeySequence.SelectPreviousChar)
asserttags_input.select_size==1QTest.keySequence(tags_input, QKeySequence.SelectNextChar)
screenshot(window, name="edit_tags_dialog_first_tag_partial_selection")
asserttags_input.select_size==1# Test navigating between the first and second tag using the keyboard buttonsQTest.keyClick(tags_input, Qt.Key_Home)
for_inrange(len(tags_input.tags[0].text) +1):
QTest.keyClick(tags_input, Qt.Key_Right)
asserttags_input.editing_index==1QTest.keyClick(tags_input, Qt.Key_Left)
asserttags_input.editing_index==0# Select all text of the first tagQTest.keySequence(tags_input, QKeySequence.SelectAll)
screenshot(window, name="edit_tags_dialog_edit_first_tag_selected")
# Remove the second tagcross_rect=tags_input.compute_cross_rect(tags_input.tags[1].rect)
QTest.mouseClick(tags_input, Qt.LeftButton, pos=cross_rect.center().toPoint())
>assertlen(tags_input.tags) ==num_tags-1Eassert4==3E+4E-3
The text was updated successfully, but these errors were encountered:
It looks to me like a race condition: the removal of the tag probably has not been fully processed before the assert is called. I will think of a solution to this.
I saw random
test_tags_dialog
fails during the #6540Full console
The text was updated successfully, but these errors were encountered: