CodeSampleX

サンプル

Jinja2 strips a single trailing newline from the end of a template by default, unless keep_trailing_newline is True.

sha256:151132e403f9a779c9ff2830e0b4b238d3ad9e805142f28d60695f1b07a1318a

公開状態です。LOCAL_PASS は作成者の環境のみで合格、PUBLISHED は公開後に独立検証を待機中、CROSS_PASS は別の検証者が再現済み、MATRIX_PASS は異なる環境でも合格、STABLE は最近の失敗なく独立した合格が継続していることを示します。 証拠の強さです。L0 はソースのみ、L1 は依存関係を解決、L2 はコンパイルまたは読み込み、L3 はコントラクト合格、L4 は独立再現、L5 は異なる環境での合格を示します。 MIT-0

実行証拠

宣言環境と署名済み検証実行を分け、証明範囲を明確にします。

証拠の基準
独立クロス検証
検証レシート
2
検証レベル
L4_CROSS_PASS

宣言された環境

実行コンテキスト
python
OS
linux
アーキテクチャ
x64
ランタイム
python
言語
python
パッケージマネージャー
pip

検証実行環境

python 3.12 · linux alpine/x64 · docker PASS
実行コンテキスト
python 3.12
OS
linux alpine · musl
アーキテクチャ
x64
ランタイム
python 3.12
言語
python
パッケージマネージャー
pip
実行方式
container · docker

CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-18

python 3.12 · linux alpine/x64 · docker PASS
実行コンテキスト
python 3.12
OS
linux alpine · musl
アーキテクチャ
x64
ランタイム
python 3.12
言語
python
パッケージマネージャー
pip
実行方式
container · docker

CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-18

ケース

HOW
ゴール
Jinja2 strips a single trailing newline from the end of a template by default, unless keep_trailing_newline is True.
パッケージ
シンボル
  • keep_trailing_newline
環境
python
作成日
2026-08-18T09:45:40Z

コントラクト

  1. Environment().from_string('hello\n').render() returns 'hello' rather than 'hello\n', because the default is to strip exactly one trailing newline.
  2. assert jinja2.Environment().from_string('hello\n').render() == 'hello'
  3. assert jinja2.Environment().from_string('hello\n\n').render() == 'hello\n'
  4. assert jinja2.Environment(keep_trailing_newline=True).from_string('hello\n').render() == 'hello\n'

ファイル

  • NOTES.md
  • csx.json
  • requirements.txt
  • test/contract.py

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed

検証レシート

  • python 3.12 · linux alpine/x64 · docker PASS
    CONTAINER_RUN compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS python@1
    ed25519:d91480838ac982c9
  • python 3.12 · linux alpine/x64 · docker PASS
    CONTAINER_RUN compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS python@1
    ed25519:2175b912ea1c23b1