From 025074c390c379602cdb9f1f704227408996dbf1 Mon Sep 17 00:00:00 2001 From: Martin Hauser Date: Tue, 16 Jun 2026 11:38:21 +0200 Subject: [PATCH] Closes #22280: Set 91% test coverage threshold and exclude non-testable paths (#22450) --- pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 600931e99..87bd6465f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,9 +34,17 @@ sigterm = true [tool.coverage.report] skip_covered = true +fail_under = 91 omit = [ "*/migrations/*", "*/tests/*", + # Non-application code (no testable logic / not part of the app) + "netbox/scripts/*", # SCRIPTS_ROOT: user/generated scripts + "*/netbox/configuration*.py", # settings/config files (template, testing, local) + "*/netbox/wsgi.py", # WSGI entrypoint + "*/generate_secret_key.py", # standalone CLI helper + "*/utilities/debug.py", # debug-toolbar hook, active only when DEBUG=True + "*/extras/management/commands/housekeeping.py", # deprecated; will not be tested ] [tool.pyright]