Merge pull request #1445 from Winxton/fix-wordcount-example
Fix wordcount example docs
This commit is contained in:
commit
c02b71fc09
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue