def test_read_index(path): if path is not None: with (path / 'wordnet' / 'index.noun').open() as file_: index = read_index(file_) assert 'man' in index assert 'plantes' not in index assert 'plant' in index
def test_read_index(): wn = path.join(LOCAL_DATA_DIR, 'wordnet') index = read_index(path.join(wn, 'index.noun')) assert 'man' in index assert 'plantes' not in index assert 'plant' in index
def test_read_index(package): with package.open(('wordnet', 'index.noun')) as file_: index = read_index(file_) assert 'man' in index assert 'plantes' not in index assert 'plant' in index