def _validate_deletion(lineedit, bridge, method, text, deleted, rest):
 lineedit.set_aug_text(text)
 method()
 assert (bridge._deleted[lineedit] == deleted)
 assert (lineedit.aug_text() == rest)
 lineedit.clear()
 bridge.rl_yank()
 assert (lineedit.aug_text() == (deleted + '|'))

def _validate_deletion ( lineedit , bridge , method , text , deleted , rest ) : lineedit . set_aug_text ( text ) method ( ) assert ( bridge . _deleted [ lineedit ] == deleted ) assert ( lineedit . aug_text ( ) == rest ) lineedit . clear ( ) bridge . rl_yank ( ) assert ( lineedit . aug_text ( ) == ( deleted + '|' ) )
run and validate a text deletion method on the readline bridge .