From f921fdf337de48f10753d4c55f39b3f1c871369b Mon Sep 17 00:00:00 2001 From: Dulmandakh Date: Tue, 20 Aug 2024 18:38:55 +0800 Subject: [PATCH] consolidate dev tools configs into pyproject.toml --- pyproject.toml | 21 +++++++++++++++++++++ setup.cfg | 22 ---------------------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 140e3c979..807ec1784 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,24 @@ +[tool.coverage.run] +source = ["sorl"] +omit = [ + "*/sorl-thumbnail/sorl/__init__.py", + "*/sorl/thumbnail/__init__.py", + "*/sorl/thumbnail/conf/__init__.py", + "*/sorl/thumbnail/admin/__init__.py", +] + +[tool.coverage.report] +exclude_lines = [ + "pragma: no cover", + "if __name__ == .__main__.:", +] + +[tool.pytest.ini_options] +python_files = ["test_*.py", "*tests.py"] +norecursedirs =[".*", "tmp*", "__pycache__"] +testpaths = ["tests"] +django_find_project = false + [tool.ruff] exclude = [ ".tox", diff --git a/setup.cfg b/setup.cfg index e48472b02..526aeb281 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,24 +1,2 @@ [bdist_wheel] universal = 0 - -;; Coverage.py, Code coverage testing for Python. - -[cov:run] -source = sorl -omit = */sorl-thumbnail/sorl/__init__.py - */sorl/thumbnail/__init__.py - */sorl/thumbnail/conf/__init__.py - */sorl/thumbnail/admin/__init__.py - -[cov:report] -exclude_lines = pragma: no cover - if __name__ == .__main__.: - -;; The pytest framework - -[tool:pytest] -python_files = test_*.py *tests.py -norecursedirs = .* tmp* __pycache__ -testpaths = tests -django_find_project = false -