@pytest.mark.parametrize('scorer,processor', scorers_processors())
@given(data=st.data())
@settings(max_examples=100)
def test_identical_strings_extracted(scorer, processor, data):
 strings = data.draw(st.lists(st.text(min_size=10, max_size=100), min_size=1, max_size=50))
 choiceidx = data.draw(st.integers(min_value=0, max_value=(len(strings) - 1)))
 choice = strings[choiceidx]
 assume((processor(choice) != ''))
 result = process.extractBests(choice, strings, scorer=scorer, processor=processor, score_cutoff=100, limit=None)
 assert (result != [])
 assert ((choice, 100) in result)

@ pytest . mark . parametrize ( 'scorer,processor' , scorers_processors ( ) ) @ given ( data = st . data ( ) ) @ settings ( max_examples = 100 ) def test_identical_strings_extracted ( scorer , processor , data ) : strings = data . draw ( st . lists ( st . text ( min_size = 10 , max_size = 100 ) , min_size = 1 , max_size = 50 ) ) choiceidx = data . draw ( st . integers ( min_value = 0 , max_value = ( len ( strings ) - 1 ) ) ) choice = strings [ choiceidx ] assume ( ( processor ( choice ) != '' ) ) result = process . extractBests ( choice , strings , scorer = scorer , processor = processor , score_cutoff = 100 , limit = None ) assert ( result != [ ] ) assert ( ( choice , 100 ) in result )
test that identical strings will always return a perfect match .