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 ## Usage
```python ```python
from word_count import search_py, WordCounter from word_count import search_py, search, search_sequential
search_py("path/to/file", "word") search_py("foo bar", "foo")
WordCounter("path/to/file").search("word") search("foo bar", "foo")
WordCounter("path/to/file").search_sequential("word") search_sequential("foo bar", "foo")
``` ```
## Benchmark ## Benchmark

View File

@ -1,13 +1,9 @@
import os
from concurrent.futures import ThreadPoolExecutor from concurrent.futures import ThreadPoolExecutor
import pytest import pytest
import word_count 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") @pytest.fixture(scope="session")
def contents() -> str: def contents() -> str: