Skip to content

Commit

Permalink
tests: Convert to Autodiscovery
Browse files Browse the repository at this point in the history
This allows the test cases to use the autodiscovery mechanisms of unittest and
pytest. Instead of requiring a bunch of manual configuration.
  • Loading branch information
techman83 committed Sep 20, 2024
1 parent cbd4ae8 commit 2ea722d
Show file tree
Hide file tree
Showing 17 changed files with 3 additions and 23 deletions.
6 changes: 2 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"python.pythonPath": "/usr/bin/python3",
"python.formatting.provider": "autopep8",
"python.defaultInterpreterPath": "/usr/bin/python",
"python.testing.cwd": "netkan/",
"editor.formatOnSave": true,
"files.exclude": {
"**/__pycache__": true
},
"python.testing.pytestEnabled": true,
"python.testing.nosetestsEnabled": false,
"python.testing.unittestEnabled": false,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"mypy.configFile": "netkan/mypy.ini"
}
1 change: 1 addition & 0 deletions netkan/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ RUN /home/netkan/.local/bin/pytest -v

FROM production AS dev
USER root
RUN apt-get install nodejs -y && apt-get clean
ADD . /netkan
RUN chown -R netkan:netkan /netkan
COPY run_dev.sh /usr/local/bin/
Expand Down
1 change: 0 additions & 1 deletion netkan/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ omit = ["tests/*"]
exclude_lines = ["if TYPE_CHECKING:", " pass"]

[tool.pytest.ini_options]
python_files = "tests/__init__.py"
addopts = "-p no:cacheprovider --mypy --pylint"
filterwarnings = ["ignore", "default:::netkan.*", "default:::tests.*"]

Expand Down
14 changes: 0 additions & 14 deletions netkan/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +0,0 @@
# flake8: noqa

from .cli import *
from .indexer import *
from .metadata import *
from .mirrorer import *
from .repos import *
from .scheduler import *
from .utils import *
from .csharp_compat import *
from .auto_freezer import *
from .spacedock_adder import *
from .status import *
from .webhooks import *
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions pytest.ini

This file was deleted.

0 comments on commit 2ea722d

Please sign in to comment.