summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* async templates await attribute accessrefactor-loop-contextDavid Lord2019-11-072-20/+24
|
* clarify quoting behavior of urlencode filterDavid Lord2019-11-041-12/+17
|
* reformat, doc, and test for wordwrapDavid Lord2019-11-011-0/+6
|
* Merge pull request #673 from MrSenko/get_corresponding_lineno_tracebackDavid Lord2019-11-011-0/+4
|\ | | | | handle template.get_corresponding_lineno() for lines without debug info
| * Add test for Template.get_corresponding_lineno()Mr. Senko2017-01-291-0/+4
| | | | | | | | this currently breaks with an exception inside Jinja
* | creating a NativeTemplate creates a NativeEnvironmentnative-template-envDavid Lord2019-10-281-119/+123
| |
* | don't create a third queueDavid Lord2019-10-241-1/+2
| |
* | LRUCache.copy initializes queue methodsRyan Siemens2019-10-241-1/+12
| |
* | preserve quotes between nodes in native envDavid Lord2019-10-221-1/+17
| |
* | support pathlib in FileSystemLoader and ModuleLoaderAlex Chan2019-10-213-8/+95
| |
* | PackageLoader doesn't depend on setuptoolsDavid Lord2019-10-172-7/+58
| |
* | fixing LoopContext, loops indexing and iterator length propertyaayushuppal2019-10-141-0/+48
| |
* | Don't make cond_expr_undefined configurableAdrian Moennich2019-10-131-9/+1
| |
* | Use separate undefined object for CondExprAdrian Moennich2019-10-131-0/+9
| |
* | skip template with same name as directoryDavid Lord2019-10-132-0/+13
| | | | | | | | | | | | When using multiple paths with FileSystemLoader, a template with the same name as a directory will not prevent loading a template in the directory.
* | don't finalize TemplateData nodesno-finalize-template-dataDavid Lord2019-10-121-10/+47
| | | | | | | | | | Finalize only applies to the output of expressions (constant or not). Add tests for context, eval, and env finalize functions.
* | fix invalid double extends testDavid Lord2019-10-101-3/+3
| |
* | Replaced try...catch within tests with pytest.raisespytest-cleanupKevin Brown2019-10-106-35/+15
| | | | | | | | | | | | This still leaves one in test_debug which relies on reading out the traceback and cannot easily be replaced by pytest.raises like the others.
* | Add more strict type testsDag Wieers2019-10-091-39/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | changed test_join functions to unique namesBrandon Tomás2019-10-091-2/+2
| |
* | Merge pull request #938 from stevenorum/masterDavid Lord2019-10-071-0/+6
|\ \ | | | | | | Fixing compiler handling of parens around boolean comparisons.
| * | Fixing compiler handling of parens around boolean comparisons.Steve Norum2019-01-121-0/+6
| | |
* | | Eliminate dead code by using pytests.raises instead of try/except/elsebtharper2019-10-062-15/+3
| | |
* | | don't bypass autoescapeDavid Lord2019-10-041-13/+5
| | |
* | | Add support for a {% debug %} extension tag.Shaheed Haque2019-10-041-0/+16
| | | | | | | | | | | | This dumps the available variables, filters and tests.
* | | Fix bug with when using Markup on ChainableUndefinedLaurence de Bruxelles2019-10-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Wrapping a ChainableUndefined object with Markup causes an UndefinedError because Markup thinks that ChainableUndefined has an attribute called __html__ and tries to call it. This commit fixes this by defining a method __html__ that calls ChainableUndefined.__str__. We also add a regression test.
* | | add chars option to trimMatteo Ferrando2019-10-041-0/+8
| | |
* | | Add tests for Undefined classesEtiennePelletier2019-10-041-0/+15
| | |
* | | Add tests for utils.py - LRUCache, Lorem Ipsum & +EtiennePelletier2019-10-042-4/+96
| | |
* | | Merge branch '2.10.x'David Lord2019-07-261-0/+9
|\ \ \
| * | | sandbox uses xrange on Python 2Prakhar Bhandari2019-07-221-1/+10
| | | |
* | | | clean up numeric underscore supportDavid Lord2019-07-232-38/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | add changelog clean up docs parametrize tests explain float regex
* | | | support underscore in int and floatCleoQc2019-07-231-3/+10
| | | |
* | | | clean up scientific notation supportDavid Lord2019-07-231-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | add changelog clean up docs parametrize tests
* | | | support scientific notationCleoQc2019-07-221-1/+3
| | | |
* | | | exclude globals from find_undeclared_variablesBrendan2019-07-221-0/+4
| | | |
* | | | add default to map filterKevin2019-07-221-0/+22
| | | |
* | | | Allow '{%+' to be valid syntax (but NOP) when lstrip_blocks == False. Fixes ↵Mark Roth2019-07-201-0/+8
| | | | | | | | | | | | | | | | #748.
* | | | Merge branch '2.10.x'David Lord2019-07-201-1/+43
|\ \ \ \ | |/ / /
| * | | Register custom test category markers.Ralph Giles2019-07-201-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since around pytest 3.6 it's been possible to register custom markers, and since version 4.5.0 pytest warns about any which are not registered. Register a list of such markers, extracted from those warnings, so they don't clutter the test output.
* | | | Merge pull request #1002 from ↵Kevin Brown2019-06-241-0/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | eplata31/bugfix-template-parse-if-with-dict-subproperty BUGFIX #930 - Template parse if with when referencing with dictionary…
| * | | | BUGFIX #930 - Template parse if with when referencing with dictionary ↵eplata312019-05-131-0/+4
| | | | | | | | | | | | | | | | | | | | subproperty
* | | | | Merge pull request #1013 from mayuropensource/jinja-670-sort-multi-attrKevin Brown2019-06-241-0/+33
|\ \ \ \ \ | | | | | | | | | | | | Add ability to specify multiple attributes in sort
| * | | | | Add ability to specify multiple attributes in sort,mayur-srivastava2019-05-311-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e.g. foo|sort(attribute='name,id'). This fixes #670
* | | | | | Added new method itervalues() to LRUCache and deprecated itervalue()gokcegrbl2019-05-311-0/+21
|/ / / / / | | | | | | | | | | | | | | | (Fixes pallets/jinja#999)
* | | | | Remove duplicated testcaseFlex Ferrum2019-05-161-2/+0
|/ / / /
* | | | Add ChainableUndefined allowing getattr & getitem (#997)Étienne Pelletier2019-05-081-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add ChainableUndefined allowing getattr & getitem Allows using default values with chains of items or attributes that may contain undefined values without raising a jinja2.exceptions.UndefinedError. >>> import jinja2 >>> env = jinja2.Environment(undefined=jinja2.ChainableUndefined) >>> env.from_string("{{ foo.bar['baz'] | default('val') }}").render() 'val' * Remove class decorator from ChainableUndefined
* | | | Merge branch '2.10.x'David Lord2019-04-061-0/+19
|\ \ \ \ | |/ / /
| * | | sandbox str.format_mapArmin Ronacher2019-04-061-0/+19
| | | |
* | | | Await in async version of the map filter (#913)seaders2019-02-182-0/+9
| |/ / |/| |