| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This PR adds a few more type-related tests.
- boolean
Testing of an object is a boolean required 2 tests.
- false
Make this similar to testing none value
- true
Make this similar to testing none value
- integer
The existing 'number' test does not make a distinction between
integer, float or even booleans
- float
The existing 'number' test does not make a distinction between
integer, float or even booleans
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Python 3.7, importing ABCs directly from the `collections` module shows a
warning (and in Python 3.8 it will stop working) - see
https://github.com/python/cpython/commit/c66f9f8d3909f588c251957d499599a1680e2320
This fixes various DeprecationWarnings such as those:
```
.../jinja2/utils.py:485: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import MutableMapping
.../jinja2/runtime.py:318: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import Mapping
```
|
|
|
|
|
|
| |
add tests and aliases for all comparison operators
adjust docs to prefer short names for compare tests
closes #664
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It can be helpful to have a test for values that are greater or less than
another value, especially when looping over lists and using `select()` or
`selectattr()` filters. This patch adds tests that allow a developer to
check if a value is greater or less than another value.
For example, if I have a list of vehicles and I want to find the motorcycles:
vehicles | selectattr('wheels', 'lessthan', 3)
Or, if I want to find large trucks:
vehicles | selectattr('wheels', 'greaterthan', 4)
Tests are included.
|
|\
| |
| | |
Added ".. versionadded:: 2.8" to `equalto` test
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(replacing unicode with six.text_type, but not replacing u"" by six.u(""))
|
| |
|
|
|
|
|
|
|
|
| |
doctests that just show usage that would not work on their own so that
they are standard code blocks now and do not disturb testing.
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
--HG--
branch : trunk
rename : jinja/__init__.py => jinja2/__init__.py
rename : jinja/_debugger.c => jinja2/_debugger.c
rename : jinja/_native.py => jinja2/_native.py
rename : jinja/_speedups.c => jinja2/_speedups.c
rename : jinja/constants.py => jinja2/constants.py
rename : jinja/contrib/__init__.py => jinja2/contrib/__init__.py
rename : jinja/contrib/_djangosupport.py => jinja2/contrib/_djangosupport.py
rename : jinja/contrib/djangosupport.py => jinja2/contrib/djangosupport.py
rename : jinja/datastructure.py => jinja2/datastructure.py
rename : jinja/defaults.py => jinja2/defaults.py
rename : jinja/environment.py => jinja2/environment.py
rename : jinja/exceptions.py => jinja2/exceptions.py
rename : jinja/filters.py => jinja2/filters.py
rename : jinja/lexer.py => jinja2/lexer.py
rename : jinja/loaders.py => jinja2/loaders.py
rename : jinja/nodes.py => jinja2/nodes.py
rename : jinja/parser.py => jinja2/parser.py
rename : jinja/tests.py => jinja2/tests.py
rename : jinja/translators/__init__.py => jinja2/translators/__init__.py
rename : jinja/translators/python.py => jinja2/translators/python.py
rename : jinja/utils.py => jinja2/utils.py
|