From 93aed3765ccf303d450ae4c91ab9bdbf812a7ea4 Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 22 Feb 2026 07:44:11 +0000 Subject: [PATCH] Update cookiecutter --- lint_requirements.txt | 2 +- tests/scripts/config.source | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/lint_requirements.txt b/lint_requirements.txt index f7e27d6..1246a40 100644 --- a/lint_requirements.txt +++ b/lint_requirements.txt @@ -1,5 +1,5 @@ # Lint requirements -ruff~=0.15.0 +ruff~=0.15.1 mypy~=1.19.1 shellcheck-py~=0.11.0.1 diff --git a/tests/scripts/config.source b/tests/scripts/config.source index 5901cc6..cfa0a62 100644 --- a/tests/scripts/config.source +++ b/tests/scripts/config.source @@ -80,4 +80,28 @@ expect_deny () { fi } +# Expects the provided test to pass +# Supresses all output, which is redirected to ASSERTION_OUTPUT and +# ASSERTION_ERROUTPUT so as not to overwrite the latest OUTPUT and ERROUTPUT. +# That way we can test several assertions in a row. +# Reports verbosely on failure. +assert () { + if { + [[ "$@" ]] + } 1>log.out 2>log.err + then + echo "SUCCESS [$@]" >&3 + ASSERTION_OUTPUT="$(cat log.out)" + ASSERTION_ERROUTPUT="$(cat log.err)" + else + echo "FAILURE [$@]" >&3 + echo "=== STDOUT ===" >&3 + cat log.out >&3 + echo "=== STDERR ===" >&3 + cat log.err >&3 + echo "==============" >&3 + false + fi +} + set -eu