fix(test): remediate repository-wide regressions (Closes #673)

This commit is contained in:
2026-07-10 18:09:19 -04:00
parent ec903b0d61
commit a7aac0df1d
12 changed files with 75 additions and 21 deletions
+5
View File
@@ -29,6 +29,11 @@ class UnsanctionedRuntimeError(RuntimeError):
def is_pytest_runtime() -> bool:
if os.environ.get("GITEA_TEST_FORCE_UNSANCTIONED") == "1":
return False
import sys
if "pytest" in sys.modules:
return True
return bool((os.environ.get("PYTEST_CURRENT_TEST") or "").strip())