summaryrefslogtreecommitdiff
path: root/jinja2/tests.py
Commit message (Collapse)AuthorAgeFilesLines
* use "Jinja" instead of "Jinja2"David Lord2019-10-231-2/+2
|
* Add more strict type testsDag Wieers2019-10-091-0/+47
| | | | | | | | | | | | | | | | | | | | | 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
* Import abstract base classes from collections.abcFlorian Bruhin2018-08-071-3/+2
| | | | | | | | | | | | | | | | 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 ```
* allow using comparison operator symbols as testsDavid Lord2017-07-061-36/+17
| | | | | | add tests and aliases for all comparison operators adjust docs to prefer short names for compare tests closes #664
* Added changelog entry for #658Armin Ronacher2017-01-121-1/+4
|
* Add "is in" containment test (#658)Dirk D2017-01-121-1/+7
|
* Bump up the copyright to 2017Armin Ronacher2017-01-071-1/+1
|
* Add test for greater/less than (#624)Major Hayden2017-01-041-1/+13
| | | | | | | | | | | | | | | | 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.
* Merge pull request #344 from walterl/masterMarkus Unterwaditzer2015-03-111-0/+2
|\ | | | | Added ".. versionadded:: 2.8" to `equalto` test
| * Added ".. versionadded:: 2.8" to test_equalto.__doc__Walter Leibbrandt2014-06-191-0/+2
| |
* | decimal is a numberTim Bray2015-03-111-2/+2
| |
* | Fix number test failing for long in Python 2ThiefMaster2015-02-061-2/+2
|/
* Added a note on why equalto exists.Armin Ronacher2013-12-121-0/+10
|
* Add equalto test as value-level analogue of reference-level sameas test.Thomas van Noort2013-11-221-0/+11
|
* Removed some no longer needed code from compatArmin Ronacher2013-05-201-2/+3
|
* Make the runtime leak less of the version hacksArmin Ronacher2013-05-201-5/+1
|
* Moved all six usages (ignoring testsuite) into jinja2._compatArmin Ronacher2013-05-191-14/+5
|
* python 3 port: manual fixes, remove 2to3 from setup.py, remove fixersThomas Waldmann2013-05-181-2/+2
|
* python 3 port: automated changes by a slightly modified python-modernizeThomas Waldmann2013-05-171-2/+3
| | | | (replacing unicode with six.text_type, but not replacing u"" by six.u(""))
* Added test for mappings. This fixes #35Armin Ronacher2011-05-241-0/+15
|
* Improved test invokation. Picks up doctests within Jinja now, changedArmin Ronacher2010-02-071-0/+3
| | | | | | | | 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
* It's a new yearArmin Ronacher2010-01-221-1/+1
| | | | | --HG-- branch : trunk
* Started to work on Python 3 support.Armin Ronacher2009-08-051-1/+8
| | | | | --HG-- branch : trunk
* Copyright switch to "The Jinja Team".Armin Ronacher2009-01-041-1/+1
| | | | | --HG-- branch : trunk
* added more unittests for various tasksArmin Ronacher2008-05-241-2/+2
| | | | | --HG-- branch : trunk
* Fixed typos in documentationLukas Meuser2008-05-011-1/+1
| | | | | --HG-- branch : trunk
* first version of the jinja2 docsArmin Ronacher2008-04-281-1/+7
| | | | | --HG-- branch : trunk
* worked on the tests and made undefined fail on comparisons nowArmin Ronacher2008-04-261-8/+35
| | | | | --HG-- branch : trunk
* added first code for parser extensions and moved some code in speedups aroundArmin Ronacher2008-04-201-1/+7
| | | | | --HG-- branch : trunk
* updated a few docstrings and removed contribArmin Ronacher2008-04-171-5/+4
| | | | | --HG-- branch : trunk
* ported the testsArmin Ronacher2008-04-161-77/+32
| | | | | --HG-- branch : trunk
* a clean restartArmin Ronacher2008-03-311-0/+143
--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