Exemplo
Jinja2 strips a single trailing newline from the end of a template by default, unless keep_trailing_newline is True.
sha256:151132e403f9a779c9ff2830e0b4b238d3ad9e805142f28d60695f1b07a1318a
Estado de publicação. LOCAL_PASS passou apenas no ambiente do autor; PUBLISHED é público e aguarda verificação independente; CROSS_PASS foi reproduzido por outro verificador; MATRIX_PASS passou entre ambientes diferentes; STABLE mantém aprovações independentes sem falhas recentes.
Força da evidência. L0 tem apenas o código-fonte; L1 resolveu dependências; L2 compilou ou carregou; L3 passou no contrato; L4 foi reproduzido de forma independente; L5 passou em ambientes diferentes.
MIT-0
Evidência de execução
O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.
- Base da evidência
- Verificação cruzada independente
- Recibos de verificação
- 2
- Nível de verificação
- L4_CROSS_PASS
Ambiente declarado
- Contexto de execução
- python
- Sistema operacional
- linux
- Arquitetura
- x64
- Runtime
- python
- Linguagem
- python
- Gerenciador de pacotes
- pip
Ambientes das execuções de verificação
- Contexto de execução
- python 3.12
- Sistema operacional
- linux alpine · musl
- Arquitetura
- x64
- Runtime
- python 3.12
- Linguagem
- python
- Gerenciador de pacotes
- pip
- Execução
- container · docker
- Contexto de execução
- python 3.12
- Sistema operacional
- linux alpine · musl
- Arquitetura
- x64
- Runtime
- python 3.12
- Linguagem
- python
- Gerenciador de pacotes
- pip
- Execução
- container · docker
Caso
HOW- Objetivo
- Jinja2 strips a single trailing newline from the end of a template by default, unless keep_trailing_newline is True.
- Pacotes
- Símbolos
-
- keep_trailing_newline
- Ambiente
- python
- Criado
- 2026-08-18T09:45:40Z
Contrato
- Environment().from_string('hello\n').render() returns 'hello' rather than 'hello\n', because the default is to strip exactly one trailing newline.
- assert jinja2.Environment().from_string('hello\n').render() == 'hello'
- assert jinja2.Environment().from_string('hello\n\n').render() == 'hello\n'
- assert jinja2.Environment(keep_trailing_newline=True).from_string('hello\n').render() == 'hello\n'
Arquivos
- NOTES.md
- csx.json
- requirements.txt
- test/contract.py
Seeder de origem
Recibos de verificação
-
python 3.12 · linux alpine/x64 · docker PASSed25519:d91480838ac982c9
-
python 3.12 · linux alpine/x64 · docker PASSed25519:2175b912ea1c23b1