Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move tests out of package and into top-level directory #2381

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[run]
branch = True
source = codespell_lib
omit = */codespell_lib/tests/*
omit = */tests/*
4 changes: 2 additions & 2 deletions .github/workflows/codespell-private.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,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
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include codespell_lib/__init__.py
recursive-include codespell_lib *.py
recursive-include tests *.py
include codespell_lib/data/dictionary*.txt
include codespell_lib/data/linux-kernel.exclude
include COPYING
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand All @@ -54,7 +54,7 @@ flake8:
flake8

pytest:
pytest codespell_lib
pytest

clean:
rm -rf codespell.1
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ build: false # Not a C# project, build stuff at the test step instead.
test_script:
- "codespell --help"
- "flake8"
- "pytest codespell_lib"
- "pytest"

on_success:
- "codecov"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import pytest

import codespell_lib
from codespell_lib._codespell import _builtin_dictionaries
from codespell_lib._codespell import supported_languages

Expand All @@ -30,7 +31,7 @@
global_pairs = 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(codespell_lib.__file__), 'data')
_fnames_in_aspell = [
(op.join(_data_dir, 'dictionary%s.txt' % d[2]), d[3:5], d[5:7])
for d in _builtin_dictionaries]
Expand Down