Kaynağa Gözat

Closes #22280: Set 91% test coverage threshold and exclude non-testable paths (#22450)

Martin Hauser 2 hafta önce
ebeveyn
işleme
025074c390
1 değiştirilmiş dosya ile 8 ekleme ve 0 silme
  1. 8 0
      pyproject.toml

+ 8 - 0
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]