def test_process_warning(capsys):
 query = ':::::::'
 choices = [':::::::']
 _ = process.extractOne(query, choices)
 (out, err) = capsys.readouterr()
 outstr = "WARNING:root:Applied processor reduces input query to empty string, all comparisons will have score 0. [Query: ':::::::']\n"
 assert (err == outstr)

def test_process_warning ( capsys ) : query = ':::::::' choices = [ ':::::::' ] _ = process . extractOne ( query , choices ) ( out , err ) = capsys . readouterr ( ) outstr = "WARNING:root:Applied processor reduces input query to empty string, all comparisons will have score 0. [Query: ':::::::']\n" assert ( err == outstr )
check that a string reduced to 0 by processor logs a warning to stderr .