diff --git a/.github/workflows/codespell-private.yml b/.github/workflows/codespell-private.yml index 88dd8aa2d1..e21f83e401 100644 --- a/.github/workflows/codespell-private.yml +++ b/.github/workflows/codespell-private.yml @@ -41,9 +41,9 @@ jobs: - run: codespell --version - run: make check - uses: codecov/codecov-action@v3 - - run: codespell --check-filenames --skip="./.git/*,*.pyc,./codespell_lib/tests/test_basic.py,./codespell_lib/data/*,./example/code.c,./build/lib/codespell_lib/tests/test_basic.py,./build/lib/codespell_lib/data/*,README.rst,*.egg-info/*" + - run: codespell --check-filenames --skip="./.git/*,*.pyc,./tests/test_basic.py,./codespell_lib/data/*,./example/code.c,./build/lib/tests/test_basic.py,./build/lib/codespell_lib/data/*,README.rst,*.egg-info/*" # this file has an error - - run: "! codespell codespell_lib/tests/test_basic.py" + - run: "! codespell tests/test_basic.py" make-check-dictionaries: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 1757974280..baee2a3cdc 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ check-dictionaries: fi; \ done @if command -v pytest > /dev/null; then \ - pytest codespell_lib/tests/test_dictionary.py; \ + pytest tests/test_dictionary.py; \ else \ echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \ exit 1; \ @@ -55,7 +55,7 @@ flake8: pytest: @if command -v pytest > /dev/null; then \ - pytest codespell_lib; \ + pytest tests; \ else \ echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \ exit 1; \ diff --git a/codespell_lib/tests/__init__.py b/tests/__init__.py similarity index 100% rename from codespell_lib/tests/__init__.py rename to tests/__init__.py diff --git a/codespell_lib/tests/test_basic.py b/tests/test_basic.py similarity index 100% rename from codespell_lib/tests/test_basic.py rename to tests/test_basic.py diff --git a/codespell_lib/tests/test_dictionary.py b/tests/test_dictionary.py similarity index 99% rename from codespell_lib/tests/test_dictionary.py rename to tests/test_dictionary.py index 327c647d2f..8cc31d96d1 100644 --- a/codespell_lib/tests/test_dictionary.py +++ b/tests/test_dictionary.py @@ -30,7 +30,7 @@ global_pairs: Set[Tuple[str, str]] = set() # Filename, should be seen as errors in aspell or not -_data_dir = op.join(op.dirname(__file__), '..', 'data') +_data_dir = op.join(op.dirname(__file__), '..', 'codespell_lib', 'data') _fnames_in_aspell = [ (op.join(_data_dir, 'dictionary%s.txt' % d[2]), d[3:5], d[5:7]) for d in _builtin_dictionaries]