Merge pull request #1445 from Winxton/fix-wordcount-example

Fix wordcount example docs
This commit is contained in:
David Hewitt 2021-02-25 00:16:26 +00:00 committed by GitHub
commit c02b71fc09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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: