Add test
This commit is contained in:
@ -12,7 +12,11 @@ dependencies = [
|
||||
]
|
||||
|
||||
[dependency-groups]
|
||||
dev = ["pytest-asyncio", "pytest", "ruff"]
|
||||
dev = [
|
||||
"pytest-asyncio",
|
||||
"pytest",
|
||||
"ruff",
|
||||
]
|
||||
|
||||
[tool.ruff]
|
||||
# https://docs.astral.sh/ruff/linter/
|
||||
@ -54,18 +58,18 @@ lint.pydocstyle.convention = "google"
|
||||
# Add "from __future__ import annotations" to all files
|
||||
lint.isort.required-imports = ["from __future__ import annotations"]
|
||||
|
||||
lint.pycodestyle.ignore-overlong-task-comments = true
|
||||
|
||||
# Default is 88 characters
|
||||
line-length = 120
|
||||
|
||||
lint.pycodestyle.ignore-overlong-task-comments = true
|
||||
|
||||
[tool.ruff.format]
|
||||
# https://docs.astral.sh/ruff/formatter/
|
||||
docstring-code-format = true
|
||||
docstring-code-line-length = 20
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"**/tests/**" = [
|
||||
"**/*_test.py" = [
|
||||
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
|
||||
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
|
||||
"PLR2004", # Magic value used in comparison, ...
|
||||
@ -81,5 +85,5 @@ log_cli_level = "INFO"
|
||||
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
|
||||
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
|
||||
|
||||
# Only check /tests/ directory for tests.
|
||||
testpaths = ["tests"]
|
||||
# Only test files with the following suffixes.
|
||||
python_files = "test_*.py *_test.py *_tests.py"
|
||||
|
Reference in New Issue
Block a user