Exemplo n.º 1
0
def test_make_fuzzy_should_remove_letter_if_world_is_long():
    assert 'mt' not in make_fuzzy('mot')
    assert 'rain' in make_fuzzy('train')
    assert 'tain' in make_fuzzy('train')
    assert 'trin' in make_fuzzy('train')
    assert 'tran' in make_fuzzy('train')
    assert 'trai' in make_fuzzy('train')
Exemplo n.º 2
0
def test_make_fuzzy_should_remove_letter_if_world_is_long():
    assert 'mt' not in make_fuzzy('mot')
    assert 'rain' in make_fuzzy('train')
    assert 'tain' in make_fuzzy('train')
    assert 'trin' in make_fuzzy('train')
    assert 'tran' in make_fuzzy('train')
    assert 'trai' in make_fuzzy('train')
Exemplo n.º 3
0
def test_make_fuzzy_should_extend_term():
    expected = set([
        'omt', 'mto', 'amot', 'maot', 'moat', 'mota', 'bmot', 'mbot', 'mobt',
        'motb', 'cmot', 'mcot', 'moct', 'motc', 'dmot', 'mdot', 'modt', 'motd',
        'emot', 'meot', 'moet', 'mote', 'fmot', 'mfot', 'moft', 'motf', 'gmot',
        'mgot', 'mogt', 'motg', 'hmot', 'mhot', 'moht', 'moth', 'imot', 'miot',
        'moit', 'moti', 'jmot', 'mjot', 'mojt', 'motj', 'kmot', 'mkot', 'mokt',
        'motk', 'lmot', 'mlot', 'molt', 'motl', 'mmot', 'mmot', 'momt', 'motm',
        'nmot', 'mnot', 'mont', 'motn', 'omot', 'moot', 'moot', 'moto', 'pmot',
        'mpot', 'mopt', 'motp', 'qmot', 'mqot', 'moqt', 'motq', 'rmot', 'mrot',
        'mort', 'motr', 'smot', 'msot', 'most', 'mots', 'tmot', 'mtot', 'mott',
        'mott', 'umot', 'muot', 'mout', 'motu', 'vmot', 'mvot', 'movt', 'motv',
        'wmot', 'mwot', 'mowt', 'motw', 'xmot', 'mxot', 'moxt', 'motx', 'ymot',
        'myot', 'moyt', 'moty', 'zmot', 'mzot', 'mozt', 'motz', 'aot', 'mat',
        'moa', 'bot', 'mbt', 'mob', 'cot', 'mct', 'moc', 'dot', 'mdt', 'mod',
        'eot', 'met', 'moe', 'fot', 'mft', 'mof', 'got', 'mgt', 'mog', 'hot',
        'mht', 'moh', 'iot', 'mit', 'moi', 'jot', 'mjt', 'moj', 'kot', 'mkt',
        'mok', 'lot', 'mlt', 'mol', 'mmt', 'mom', 'not', 'mnt', 'mon',
        'oot', 'moo', 'pot', 'mpt', 'mop', 'qot', 'mqt', 'moq', 'rot',
        'mrt', 'mor', 'sot', 'mst', 'mos', 'tot', 'mtt', 'uot', 'mut',
        'mou', 'vot', 'mvt', 'mov', 'wot', 'mwt', 'mow', 'xot', 'mxt', 'mox',
        'yot', 'myt', 'moy', 'zot', 'mzt', 'moz',
    ])
    assert set(make_fuzzy('mot')) == expected
Exemplo n.º 4
0
def test_make_fuzzy_should_extend_term():
    expected = set([
        'omt',
        'mto',
        'amot',
        'maot',
        'moat',
        'mota',
        'bmot',
        'mbot',
        'mobt',
        'motb',
        'cmot',
        'mcot',
        'moct',
        'motc',
        'dmot',
        'mdot',
        'modt',
        'motd',
        'emot',
        'meot',
        'moet',
        'mote',
        'fmot',
        'mfot',
        'moft',
        'motf',
        'gmot',
        'mgot',
        'mogt',
        'motg',
        'hmot',
        'mhot',
        'moht',
        'moth',
        'imot',
        'miot',
        'moit',
        'moti',
        'jmot',
        'mjot',
        'mojt',
        'motj',
        'kmot',
        'mkot',
        'mokt',
        'motk',
        'lmot',
        'mlot',
        'molt',
        'motl',
        'mmot',
        'mmot',
        'momt',
        'motm',
        'nmot',
        'mnot',
        'mont',
        'motn',
        'omot',
        'moot',
        'moot',
        'moto',
        'pmot',
        'mpot',
        'mopt',
        'motp',
        'qmot',
        'mqot',
        'moqt',
        'motq',
        'rmot',
        'mrot',
        'mort',
        'motr',
        'smot',
        'msot',
        'most',
        'mots',
        'tmot',
        'mtot',
        'mott',
        'mott',
        'umot',
        'muot',
        'mout',
        'motu',
        'vmot',
        'mvot',
        'movt',
        'motv',
        'wmot',
        'mwot',
        'mowt',
        'motw',
        'xmot',
        'mxot',
        'moxt',
        'motx',
        'ymot',
        'myot',
        'moyt',
        'moty',
        'zmot',
        'mzot',
        'mozt',
        'motz',
        'aot',
        'mat',
        'moa',
        'bot',
        'mbt',
        'mob',
        'cot',
        'mct',
        'moc',
        'dot',
        'mdt',
        'mod',
        'eot',
        'met',
        'moe',
        'fot',
        'mft',
        'mof',
        'got',
        'mgt',
        'mog',
        'hot',
        'mht',
        'moh',
        'iot',
        'mit',
        'moi',
        'jot',
        'mjt',
        'moj',
        'kot',
        'mkt',
        'mok',
        'lot',
        'mlt',
        'mol',
        'mmt',
        'mom',
        'not',
        'mnt',
        'mon',
        'oot',
        'moo',
        'pot',
        'mpt',
        'mop',
        'qot',
        'mqt',
        'moq',
        'rot',
        'mrt',
        'mor',
        'sot',
        'mst',
        'mos',
        'tot',
        'mtt',
        'uot',
        'mut',
        'mou',
        'vot',
        'mvt',
        'mov',
        'wot',
        'mwt',
        'mow',
        'xot',
        'mxt',
        'mox',
        'yot',
        'myt',
        'moy',
        'zot',
        'mzt',
        'moz',
    ])
    assert set(make_fuzzy('mot')) == expected