Fix wordcount example docs
This commit is contained in:
parent
0afc48477f
commit
5498b7ee3c
|
@ -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
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue