@pytest.mark.parametrize('which', ['next', 'prev', 'next-category', 'prev-category'])
def test_completion_item_focus_no_model(which, completionview, qtbot):
 with qtbot.assertNotEmitted(completionview.selection_changed):
  completionview.completion_item_focus(which)
 model = base.BaseCompletionModel()
 filtermodel = sortfilter.CompletionFilterModel(model, parent=completionview)
 completionview.set_model(filtermodel)
 completionview.set_model(None)
 with qtbot.assertNotEmitted(completionview.selection_changed):
  completionview.completion_item_focus(which)

@ pytest . mark . parametrize ( 'which' , [ 'next' , 'prev' , 'next-category' , 'prev-category' ] ) def test_completion_item_focus_no_model ( which , completionview , qtbot ) : with qtbot . assertNotEmitted ( completionview . selection_changed ) : completionview . completion_item_focus ( which ) model = base . BaseCompletionModel ( ) filtermodel = sortfilter . CompletionFilterModel ( model , parent = completionview ) completionview . set_model ( filtermodel ) completionview . set_model ( None ) with qtbot . assertNotEmitted ( completionview . selection_changed ) : completionview . completion_item_focus ( which )
test that selectionchanged is not fired when the model is none .