Skip to content
Myr

filter -> test in the tests section (i feel so embarrassed).

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent cb1b97f · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:docs/api.rst+3 added-3 removed
526 unmodified lines
527528Custom Tests529------------530531Tests work like filters just that there is no way for a filter to get access531Tests work like filters just that there is no way for a test to get access532to the environment or context and that they can't be chained. The return533value of a filter should be `True` or `False`. The purpose of a filter is to533value of a test should be `True` or `False`. The purpose of a test is to534give the template designers the possibility to perform type and conformability535checks.536537Here a simple filter that checks if a variable is a prime number::537Here a simple test that checks if a variable is a prime number::538539 import math540541 def is_prime(n):
84 unmodified lines