From 5498b7ee3cf7815a2c109fc3a82b193bcc6ace37 Mon Sep 17 00:00:00 2001 From: winxton Date: Wed, 24 Feb 2021 13:41:45 -0500 Subject: [PATCH] Fix wordcount example docs --- examples/word-count/README.md | 8 ++++---- examples/word-count/tests/test_word_count.py | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/word-count/README.md b/examples/word-count/README.md index 112447b4..02e81e4a 100644 --- a/examples/word-count/README.md +++ b/examples/word-count/README.md @@ -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 diff --git a/examples/word-count/tests/test_word_count.py b/examples/word-count/tests/test_word_count.py index b01e06d3..cb633622 100644 --- a/examples/word-count/tests/test_word_count.py +++ b/examples/word-count/tests/test_word_count.py @@ -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: