Fix wordcount example docs

This commit is contained in:
winxton 2021-02-24 13:41:45 -05:00
parent 0afc48477f
commit 5498b7ee3c
2 changed files with 4 additions and 8 deletions

View File

@ -11,11 +11,11 @@ python setup.py install
## Usage
```python
from word_count import search_py, WordCounter
from word_count import search_py, search, search_sequential
search_py("path/to/file", "word")
WordCounter("path/to/file").search("word")
WordCounter("path/to/file").search_sequential("word")
search_py("foo bar", "foo")
search("foo bar", "foo")
search_sequential("foo bar", "foo")
```
## Benchmark

View File

@ -1,13 +1,9 @@
import os
from concurrent.futures import ThreadPoolExecutor
import pytest
import word_count
current_dir = os.path.abspath(os.path.dirname(__file__))
path = os.path.join(current_dir, "zen-of-python.txt")
@pytest.fixture(scope="session")
def contents() -> str: