From 73248ba60ebf378ac4c5e9dfcee0b3268126f8bc Mon Sep 17 00:00:00 2001 From: staticdev Date: Sun, 28 Nov 2021 12:14:30 +0100 Subject: [PATCH] Coverage for tests --- pyproject.toml | 3 ++- tests/manage.py | 21 --------------------- 2 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 tests/manage.py diff --git a/pyproject.toml b/pyproject.toml index 6f33081..21b178b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,10 +59,11 @@ pyupgrade = "^2.29.1" [tool.coverage.paths] source = ["src", "*/site-packages"] +tests = ["tests", "*/tests"] [tool.coverage.run] branch = true -source = ["django_sorting_bootstrap"] +source = ["django_sorting_bootstrap", "tests"] [tool.coverage.report] show_missing = true diff --git a/tests/manage.py b/tests/manage.py deleted file mode 100644 index 033930b..0000000 --- a/tests/manage.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -"""Django's command-line utility for administrative tasks.""" -import os -import sys - - -def main() -> None: - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings") - try: - from django.core.management import execute_from_command_line - except ImportError as exc: - raise ImportError( - "Couldn't import Django. Are you sure it's installed and " - "available on your PYTHONPATH environment variable? Did you " - "forget to activate a virtual environment?" - ) from exc - execute_from_command_line(sys.argv) - - -if __name__ == "__main__": - main()